-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calendar logic #7642
Comments
This is used to stop range selection if you're starting to select a range, then tab away before selecting the end date: react-spectrum/packages/@react-aria/calendar/src/useRangeCalendar.ts Lines 64 to 72 in cdba748
|
Such behavior causes ambiguity, in the example from the video, if the user has chosen the start date, focused on the date in the process of choosing, and clicked on a blank field, the focus disappears and the selection is made. It is precisely a click that happens in the video. Screen.Recording.2025-01-23.at.09.23.58.mov |
I see what you're saying. This looks pretty similar, but not exactly the same, to this issue: #3738 I think we could consider reverting to the previously selected range if this is the case. I forgot if there's a reason we did this, or if there are other considerations I'm not thinking of. |
🙋 Documentation Request
In the process of developing a calendar implementation and using hooks useCalendar, some unclear cases arose.
When creating a hook:
const calendarAria = useCalendar(options, state);
in calendarAria.calendarProps there is an event that has an onBlur handler.
In the case of onBlur, it sets a value for the element that is in focus. Is this the correct behavior?
🧢 Your Company/Team
No response
The text was updated successfully, but these errors were encountered: