react-modern-calendar-datepicker
react-modern-calendar-datepicker copied to clipboard
adds a possibility to disable specific week days in every week and forcely enable specific days (opposite of disabledDays)
Examples of changes:
- Possibility to disable every monday and saturday or just disable weekends.
- Possibility to forcely enable a day, even though it is disabled via
disabledDays
ordisabledWeekDays
etc...
Usage:
<DatePicker
disabledWeekDays={[0,3]} // this will disable every monday and thursday
// just like disabledDays but it's just the opposite
enabledDays={[
{ year: 2021, month: 2, day: 18 } // this day will be enabled, even though it is disabled via disabledWeekDays (it's a thursday)
]}
/>
disabledWeekDays: Just simply enter a numeric array to disabledWeekDays
props. The array should include numeric values from 0 to 6, where 0 means Monday
and 6 means Sunday
.
enabledDays: Just simply enter an array of Day
objects and those days will not be disabled.
@Kiarash-Z This would also support a highly anticipated feature of enabling specific days (in addition to disabling specific days).
Hey @SenTisso it looks like this project is no longer maintained. See #248 I am potentially looking into forking the project.
Thanks, daniel-sudz
So I created my own fork (duh), but I also published this fork containing these features to npm @sentisso/react-modern-calendar-datepicker, so now you can use them!