Skip to content

Commit d5fcf9b

Browse files
committed
Fixed Error With v-model
1 parent 37d0357 commit d5fcf9b

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"name": "vue-functional-calendar",
88
"description": "A style-uninstallable datepicker component for Vue.js",
9-
"version": "2.1.7",
9+
"version": "2.1.8",
1010
"license": "MIT",
1111
"repository": {
1212
"type": "git",

src/Demo.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<div>
33
<functional-calendar class="demo-calendar"
4+
v-model="calendarData"
45
:sunday-start="true"
56
:is-modal="false"
67
:date-format="'dd.mm.yyyy'"
@@ -34,6 +35,7 @@
3435
},
3536
data() {
3637
return {
38+
calendarData: {},
3739
calendar: {
3840
dateRange: {
3941

src/components/FunctionalCalendar.vue

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,6 @@
206206
this.input.selectedDate = val = helpCalendar.mask(val);
207207
if (helpCalendar.getDateFromFormat(val).getMonth()) {
208208
this.calendar.selectedDate = val;
209-
this.pickYear(helpCalendar.getDateFromFormat(val).getFullYear());
210-
this.pickMonth(helpCalendar.getDateFromFormat(val).getMonth());
211209
this.markChooseDays();
212210
}
213211
}
@@ -217,8 +215,6 @@
217215
this.input.dateRange.start = val = helpCalendar.mask(val);
218216
if (helpCalendar.getDateFromFormat(val).getMonth()) {
219217
this.calendar.dateRange.start = val;
220-
// this.pickYear(helpCalendar.getDateFromFormat(val).getFullYear());
221-
// this.pickMonth(helpCalendar.getDateFromFormat(val).getMonth());
222218
this.markChooseDays();
223219
}
224220
}
@@ -228,8 +224,6 @@
228224
this.input.dateRange.end = val = helpCalendar.mask(val);
229225
if (helpCalendar.getDateFromFormat(val).getMonth()) {
230226
this.calendar.dateRange.end = val;
231-
// this.pickYear(helpCalendar.getDateFromFormat(val).getFullYear());
232-
// this.pickMonth(helpCalendar.getDateFromFormat(val).getMonth());
233227
this.markChooseDays();
234228
}
235229
}
@@ -425,9 +419,7 @@
425419
this.$emit('selectedDaysCount', diffDays);
426420
}
427421
428-
this.$emit('input', {
429-
dateRange: this.calendar
430-
});
422+
this.$emit('input', this.calendar);
431423
} else if (this.fConfigs.isDatePicker) {
432424
this.calendar.selectedDate = item.date;
433425
this.$emit('input', this.calendar);

0 commit comments

Comments
 (0)