Open
Description
react-dates version
"@types/react-dates": "21.8.1",
Describe the bug
Click start or end date inputs in range picker, it triggers click outside firstly which calls onFocusChange with null and moves on to call onClose, then range picker gets the focus on the target input and calls the onFocusChange with new focused input. This will make the picker panel flashing and impossible to capture the right event of picker is closing.
Source code (including props configuration)
Steps to reproduce the behavior:
<DateRangePicker
startDate={pickerDateRange.startDate},
startDateId="startDate",
endDate={pickerDateRange.endDate},
endDateId="endDate",
onDatesChange={({ startDate, endDate }) => {
update start and end dates
}
focusedInput={focusedInput} ,
onFocusChange={(focused) => setFocusedInput(focused)} ,
isOutsideRange={() => false}
initialVisibleMonth={() => moment().subtract(1, "month")}
displayFormat={() => "DD/MM/YYYY"}
showDefaultInputIcon={true}
numberOfMonths={2}
readOnly={true}
/>
Desktop (please complete the following information):
- OS: WINDOWS
- Browser [chrome]
Metadata
Metadata
Assignees
Labels
Oh no, something's broken :-(Oh no, something's broken :-(This is a great way to contribute! Help us out :-DThis is a great way to contribute! Help us out :-D