Replies: 1 comment 1 reply
-
You can already drag the ends of a range to adjust them |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm building a custom date range picker with RAC, and finding that once a range is selected, the state change that happens on the next click is somewhat counter-intuitive: namely, that the next click is simply treated as the start of a new range selection.
In react-day-picker, which is the component basis I'm migrating away from in this case, after you create an initial range selection, the further clicks follow this logic:
start
sets a newstart
, keeping the sameend
(extends the range)end
sets a newend
, keeping the samestart
(extends the range)start
andend
, sets a newend
(shortens the range)One could debate the logic of the third case; but the first two cases are quite common, and intuitively implemented here—especially when the range spans multiple "pages" of the calendar, allowing you to modify the
start
orend
without having to recreate the whole thing; so my question is: is there any way to get lower-level access to the range setting behaviour ofRangeCalendar
, so that I could allow refinement of an existing range rather than causing it to be cleared and forcing the user to start over?Beta Was this translation helpful? Give feedback.
All reactions