Skip to content

Commit

Permalink
Fix: allowInput issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurk91 committed Oct 6, 2020
1 parent 508506f commit 64cd155
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 64cd155

Please sign in to comment.