wc-datepicker
wc-datepicker copied to clipboard
feat: prevent focus on disabled dates
Hi,
This is a proposal to prevent focus on disabled dates (cf #25 ). I struggled to find a satisfying behavior, and eventually settled on the following one :
- up/down/left/right arrows will look for the first available (not disabled) date in the corresponding direction, up to a maximum difference in days (customizable via the
max-search-days
attribute) - Home/End will look for the first/last available date in the current month
- Page up/down will look for the first available date in the previous/next month
- Shift + Page up/down will look for the next available date a year before/after the current date
Please let me know what you think.