I want to use a simple directive to use flatpickr with vue.js, like the author suggest here:
import Flatpickr from "flatpickr";
import Vue from "vue";
// <input type="text" v-flatpickr="{'enableTime': true}"
Vue.directive("flatpickr", {
bind: (el, binding) => {
el._flatpickr = new Flatpickr(el, binding.value);
},
unbind: el => el._flatpickr.destroy()
});
I created a simple fiddle to see if this works.
On the desktop it's all fine, but when switching to mobile-mode (via chrome dev tools) and press "run" the needed input isn't created. Only the hidden
input is created (see via inspect).
Anyone knows what this could cause this?