Skip to content

Commit 3bd3775

Browse files
committed
fix: disabled-dates callback prop issue in year-picker
1 parent b59683e commit 3bd3775

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/VueDatePicker/components/YearPicker/year-picker.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export const useYearPicker = (props: PickerBasePropsType, emit: VueEmit) => {
6161
if (propDates.value.disabledDates instanceof Map) {
6262
return propDates.value.disabledDates.size ? propDates.value.disabledDates.has(`${year}`) : false;
6363
}
64+
if (typeof propDates.value.disabledDates === 'function') {
65+
return propDates.value.disabledDates(setYear(resetDateTime(startOfYear(getDate())), year));
66+
}
6467
return true;
6568
};
6669

0 commit comments

Comments
 (0)