Skip to content

Commit

Permalink
Update Input.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet committed Oct 23, 2022
1 parent b884dc0 commit 5a9f6dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Components/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ export default {
element,
Object.assign({}, this.flatpickr, this.jsFlatpickrOptions, {
onChange: (selectedDates, newValue) => {
if(this.flatpickrInstance.config.mode === "range" && this.flatpickrInstance.selectedDates.length < 2) {
return;
}
if (newValue != this.modelValue) {
this.$emit("update:modelValue", newValue);
}
Expand Down

0 comments on commit 5a9f6dd

Please sign in to comment.