Skip to content

Commit

Permalink
Add scope to customPredictor
Browse files Browse the repository at this point in the history
  • Loading branch information
lsapan committed Apr 3, 2020
1 parent de0fc75 commit 4ef3523
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/PickerDay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/components/PickerMonth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/components/PickerYear.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4ef3523

Please sign in to comment.