Reproduction link
Steps to reproduce
- Add a start date (07/20/2022)
- Add an end date (07/22/2022)
- Edit the end date to be before the start date (end date -> 07/01/2022)
- Notice the start date is set to the end date but still requires another click to set the date. (In our
onCalendarChange
we set the start date to be the end date if the end date is before the start date) - However the start date isn't actually set and the cursor remains in the start date
What is expected?
If the date values are set programmatically, the values get set and the cursors input is based on the values. If we programmatically set the start date, the cursor would be in the end input.
What is actually happening?
The cursor does not change locations based on values set. When the date values are set, an extra click is needed to actually set the start value.
Environment | Info |
---|---|
antd | 4.21.7 |
React | 17.02 |
System | Mac |
Browser | Chrome |
We are trying to reduce the number of clicks a user needs to take for editing in new dates. If a user changes any of the dates, we want the range picker to be responsive enough based on what dates they choose. A similar user experience as other range picker libraries such as: https://react-dates.github.io/react-dates/?path=/story/daterangepicker-drp--default
1条答案
按热度按时间pexxcrt21#
Just wanted to say we have the exact same issue, it's confusing our users a lot, we had to reverse to 2 separate components for now to avoid confusion.
The issue is even more noticeable with the RangePicker with Day + hours selection.
It would be greatly appreciated to have an option to stop the automatic switch between start and end date :)