-
-
Notifications
You must be signed in to change notification settings - Fork 761
Closed
Milestone
Description
We can extend the type of modifiers to accept days of the weeks.
A common case is to match all the Sundays. This can be done using a function:
const sunday = day => day.getDate() === 0
<DayPicker disabledDays={ sunday } />Instead, we should be able to write:
// Disable Sundays
<DayPicker disabledDays={{ daysOfWeek: 0 }} />
// Disable Sundays and Saturdays
<DayPicker disabledDays={{ daysOfWeek: [0, 6] }} />- implement new modifier type
- add unit tests
- update docs
- update examples
- update typescript definitions file