Open ds-clearago opened 9 months ago
I'm not sure yet if I'm in favor of adding properties for all these specific use cases, but it's actually already possible to achieve the same with the isDateUnavailable
property.
Adding more docs and perhaps some helpers could be a great start. Something like this for example:
const daysOfWeekUnavailable = (date, days) => {
return days.includes(date.toDate().getDay())
}
const isDateUnavailable = (date) =>
return daysOfWeekUnavailable(date, [0, 6])
)
<DatePicker isDateUnavailable={isDateUnavailable} />
So that holidays and weekends can be disabled etc.) not only maxValue/minValue
If on top of that certain weekdays can be disabled in general, that would be great (we almost never need Saturdays and Sundays to be selectable)
See
datesDisabled
+daysOfWeekDisabled