-
How I think it's not a right designAs a user, I would not expect that clicking on title of calendar, empty cell or anywhere outside the calendar would affect my selection. But: Screen.Recording.2024-01-16.at.11.02.02.PM.movThe running code is an example from docs Digging into source code I found the code doing that react-spectrum/packages/@react-aria/calendar/src/useRangeCalendar.ts Lines 66 to 71 in 4ae2831 The problem is that Real world example for interacting on title, empty cell, etc.I want to make a scrollable RangeCalendar as Booking.com: Screen.Recording.2024-01-16.at.11.28.22.PM.movHere's a codesandbox with Screen.Recording.2024-01-16.at.11.37.30.PM.movBut when I scroll RangeCalendar by "finger" it select the same day as end day. I can hardly select range across multiple months "on mobile". It is caused by react-spectrum/packages/@react-aria/calendar/src/useRangeCalendar.ts Lines 41 to 61 in 4ae2831
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I think #3738 (comment) had an interesting idea for handling this where we should ignore blur events that happen as a result of an interaction within the RangeCalendar's containing modal. Of course there is still the issue where you could be pressing on a non-focusable element like you've shown here so maybe we could try to improve detection here or disable this blur behavior as a whole when in a modal and instead tie it to the modal's closure instead. |
Beta Was this translation helpful? Give feedback.
-
I'm closing this as my goal is to make a mobile-scrollable-multi-month calendar. But I made it too vague. Virtually, touch-scrolling a calendar is not necessary related to clicking, tabbing out a calendar. A new issue with PR for on touch-scroll only: #5975 |
Beta Was this translation helpful? Give feedback.
I'm closing this as my goal is to make a mobile-scrollable-multi-month calendar. But I made it too vague. Virtually, touch-scrolling a calendar is not necessary related to clicking, tabbing out a calendar.
A new issue with PR for on touch-scroll only: #5975