From 64cd155e8c7c03a716578207b3c45986e8f01a00 Mon Sep 17 00:00:00 2001 From: ankurk91 Date: Tue, 6 Oct 2020 16:25:49 +0530 Subject: [PATCH] Fix: allowInput issue --- package.json | 2 +- src/component.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 87e3650..5fc5098 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-flatpickr-component", - "version": "9.0.0", + "version": "9.0.1", "description": "Vue.js component for Flatpickr date-time picker", "main": "dist/vue-flatpickr.js", "browser": "dist/vue-flatpickr.min.js", diff --git a/src/component.js b/src/component.js index 45e46b7..156f972 100644 --- a/src/component.js +++ b/src/component.js @@ -2,7 +2,7 @@ import Flatpickr from 'flatpickr'; import {excludedEvents, includedEvents} from './events.js'; import {arrayify, camelToKebab, cloneObject} from './util.js'; // You have to import css yourself -import {h, nextTick, ref} from 'vue'; +import {h, nextTick} from 'vue'; // Keep a copy of all events for later use const allEvents = includedEvents.concat(excludedEvents); @@ -196,7 +196,7 @@ export default { */ modelValue(newValue) { // Prevent updates if v-model value is same as input's current value - if (newValue === ref('root').value) return; + if (newValue === this.$refs.root.value) return; // Make sure we have a flatpickr instance this.fp && // Notify flatpickr instance that there is a change in value