Skip to content

Commit 4ef3523

Browse files
committed
Add scope to customPredictor
1 parent de0fc75 commit 4ef3523

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/components/PickerDay.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export default {
273273
if (typeof this.disabledDates.daysOfMonth !== 'undefined' && this.disabledDates.daysOfMonth.indexOf(this.utils.getDate(date)) !== -1) {
274274
disabledDates = true
275275
}
276-
if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date)) {
276+
if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date, 'day')) {
277277
disabledDates = true
278278
}
279279
return disabledDates

src/components/PickerMonth.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export default {
188188
}
189189
}
190190
191-
if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date)) {
191+
if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date, 'month')) {
192192
disabledDates = true
193193
}
194194
return disabledDates

src/components/PickerYear.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export default {
161161
}
162162
}
163163
164-
if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date)) {
164+
if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date, 'year')) {
165165
disabledDates = true
166166
}
167167

0 commit comments

Comments
 (0)