range selection doesn't work with only 'to' date #1875
Unanswered
Sam-Apostel
asked this question in
Support
Replies: 2 comments
-
PR adding this behaviour: #1876 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Sam-Apostel I believe this is a desired behaviour! Think about it - it makes sense to have a selected from date where the picker is clicked once with an option to pick an end, but not the other way around.
Try it here https://react-day-picker.js.org/basics/selecting-days#selecting-a-range-of-days. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using
mode="range"
you can useselected={{ from: new Date(), to: undefined }}
and it renders correctly. But when I useselected={{ from: undefined, to: new Date() }}
nothing seems to be selected and the next time you click a date theonSelect
callback doesn't receive theto
-date.Is this a bug or intentional?
Is there a way to toggle this behaviour? What would this look like if I were to implement this?
Beta Was this translation helpful? Give feedback.
All reactions