Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Added a new property to specify dates to disable. #74

Closed
wants to merge 1 commit into from

Conversation

anizovtsev
Copy link

Hi,

Thanks for the control! In addition to min and max properties, I have created a new one to disable single date(s) in between.

@WickyNilliams
Copy link
Contributor

WickyNilliams commented Mar 15, 2021

Hey, thanks for this. Unfortunately there's already an outstanding PR to add this feature in a way that is more flexible (#52)...

Instead of passing an array of dates as you have done here, the linked PR adds support for a new property isDateDisabled: (date: Date) => boolean. This allows you to do things like disable all weekends, or every third friday, or any logic whatsoever, without having to all enumerate dates.

That's more the direction i'd like to go with this, but there are some accessibility challenges (how to clearly communicate disabled dates to assistive technologies) that I have not yet got around to investigating.

So I will close this as it is not the direction i'd like to go. Thanks again, sorry you wasted some time on this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants