Skip to content

Commit 61ec674

Browse files
authored
Merge pull request #1107 from sahilrajthapa/fix/yearpicker-issue
fix: disabled-dates callback prop issue in year-picker
2 parents 9fc422a + 3bd3775 commit 61ec674

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

+3
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)