-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Hi, I've found a bug when using the exclude.date property. When trying to exclude a specific date, the library is blocking the same date across all years, even when providing a complete date with year specification.
Steps to reproduce
const props = useDatePicker({
selectedDates,
onDatesChange,
calendar: {
startDay: 1,
},
exclude: {
date: [new Date(2025, 1, 20)], // or simply new Date()
},
});
Codesandbox
Expected behavior
The date should only be blocked for the specified year (2025).
Current behavior
The date (February 20th) is being blocked for all years when navigating through the calendar.
I've tried different approaches like:
-
Using new Date()
-
Explicitly setting the date with new Date(2025, 1, 20)
But the issue persists. The date continues to be blocked across all years.
Environment
-
@rehookify/datepicker version: 6.6.8
-
React version: 19.0.0
Let me know if you need any additional information. Thank you!
Metadata
Metadata
Assignees
Labels
No labels