From 4ef352326c1d1310a2f233ecb1603f064ea30b5e Mon Sep 17 00:00:00 2001 From: Luke Sapan Date: Fri, 3 Apr 2020 13:42:36 -0400 Subject: [PATCH] Add scope to customPredictor --- src/components/PickerDay.vue | 2 +- src/components/PickerMonth.vue | 2 +- src/components/PickerYear.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/PickerDay.vue b/src/components/PickerDay.vue index 819d0633..135feff0 100644 --- a/src/components/PickerDay.vue +++ b/src/components/PickerDay.vue @@ -273,7 +273,7 @@ export default { if (typeof this.disabledDates.daysOfMonth !== 'undefined' && this.disabledDates.daysOfMonth.indexOf(this.utils.getDate(date)) !== -1) { disabledDates = true } - if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date)) { + if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date, 'day')) { disabledDates = true } return disabledDates diff --git a/src/components/PickerMonth.vue b/src/components/PickerMonth.vue index a1bd64d4..14850630 100644 --- a/src/components/PickerMonth.vue +++ b/src/components/PickerMonth.vue @@ -188,7 +188,7 @@ export default { } } - if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date)) { + if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date, 'month')) { disabledDates = true } return disabledDates diff --git a/src/components/PickerYear.vue b/src/components/PickerYear.vue index 2060106e..52c188e8 100644 --- a/src/components/PickerYear.vue +++ b/src/components/PickerYear.vue @@ -161,7 +161,7 @@ export default { } } - if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date)) { + if (typeof this.disabledDates.customPredictor === 'function' && this.disabledDates.customPredictor(date, 'year')) { disabledDates = true }