Open Wnt opened 5 years ago
I would like to prevent particular dates, e.g. Saturdays, Sundays and public holiday from being selected.
We are also having the exact same requirement to disable saturdays, sundays and public holidays.
Acceptance Criteria: https://github.com/vaadin/platform/issues/2867
Cross-posting this note I also added to the above acceptance criteria link:
This request is exactly what we need in our use of the vaadin date picker, except we have no need for the Java side of things. We use the date picker purely as a web component consumed within a LitElement. Would it be acceptable for us to develop a PR that implements a Javascript-only implementation where the is-date-available function is provided as a Javascript function that returns boolean? This is how our legacy datepicker is implemented and we're hoping to replace it with the Vaadin date picker yet keep this critical piece of functionality for disabling arbitrary dates.
Two additional wishes:
It should also be possible to define tooltips for certain disabled dates, so that the user gets the info why the day is disabled, e. g. "Christmas", "New Year", "Day Of The Tentacle", etc.
And, if the dates will be defined in an eager way, it should be possible to define date ranges for better DX (e.g. to represent co-worker vacation).
Looks like a great feature, in our case a valid delivery date can be any date determined by the user, so not the classical "Sat,Sun" or holiday schenario
I would like to prevent particular dates, e.g. Saturdays, Sundays and public holiday from being selected.