onSelect(Start)
See original GitHub issueIs your feature request related to a problem? Please describe. For some applications, it would be great to have an event when the user picked the start date (single mode disabled) of a date range.
Describe the solution you’d like An event for the selection of the start date (single mode disabled). Alternatively, the existing onSelect event is called when the start date is selected (but with end date parameter null/false) and then again when the selection of the range is completed.
Describe alternatives you’ve considered I don’t think there is an alternative to this. 😕
Edit: It also seems that the onDayHover
event doesn’t fire when clicking a day element (though it is stated in documentation),
but only when also hovering the item (and moving the mouse around while over the element).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top GitHub Comments
This would be very useful. I have spent a lot of time trying to use onDayHover, but it doesn’t fire on click in Safari (but does in Chrome). My use case is to set a header based on whether it is the start or end date which is being selected. I also want to be able to default the end date to the start date, if only one date is selected.
I would be happy to have an option to trigger onSelect on each date selection, and then it would be up to the onSelect function to check if both dates are available.
I have a case where I need to set the minDays option depending on the start date (high-season 14 days or low-season 7 days). So having the onSelect also fire when start date is selected would be nice. Or add events onSelectStart and onSelectEnd.