domino-ui
domino-ui copied to clipboard
Make it possible to disable certain dates in datebox / datepicker
Is your feature request related to a problem? Please describe. People should be only allowed to pick certain dates in a datebox/datepicker.
For example
- Only mondays and tuesdays
- Or no weekends
- Only first monday of each month
- Only first day of each quarter/semester/....
Describe the solution you'd like Not sure how to implement this.
- setValidDates(List<Date> validDates) --> user may only pick these days
- setInvalidDates(List<Date> invalidDates) --> user may not pick these days
- setValidWeekDay --> user may only pick these days of the week
- .....
Describe alternatives you've considered /
Additional context /
Theres a much simpler way to white or blacklist dates, using a Predicate<Date>. The Predicate can then have any logic it wishes to allow or disallow any date based on any logic be it only allowing Mondays, only allowing the first of each month or whatever. Its not practical to require a List of ALL valid or ALL invalid, there could be 100s or 1000s or a lot more than that.