Date picker help #142
-
Can someone kindly help me understand how to use the selected date range in the Date Picker? Unless I am understanding the return value incorrectly when I select a range and use handleSelect to set that value into a useState variable, it only returns the first date selected. E.G. if I selected 4th October to 8th October the value set is 'Tue Oct 04 2022 00:00:00 GMT+1100 (Australian Eastern Daylight Time)'. I can't see the second date anywhere, so I am unsure how I can actually utilise the selected range. Below code as an example of how I'm getting the range
I have looked through the documentation but cannot find any clarification. Any help would be greatly appreciated :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, thanks for pointing this out, we realized we have a mistake in our docs: the return value in the callback of the |
Beta Was this translation helpful? Give feedback.
Hey, thanks for pointing this out, we realized we have a mistake in our docs: the return value in the callback of the
Datepicker
is actually two values. Which would look like this:<Datepicker handleSelect={(startDate, endDate) => ... }/>
. Fixed this now in our docs :)