react-dates version
21.8.0
Describe the bug
I use the "DateRangePicker" component in a project and I need to test the user flow with the Testing Library. The problem is that when I do the first click (userEvent.click()), on the first date, the modal is closed, not waiting for the selection of the second date.
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"react-dates": "^21.8.0",
Source code (including props configuration)
Steps to reproduce the behavior:
<DateRangePicker
noBorder
minimumNights={0}
startDate={startDate}
startDateId="start-date-id"
endDate={endDate}
endDateId="end-date-id"
onDatesChange={handleDatesChange}
focusedInput={focusedInput}
onFocusChange={(focusedInput) => setFocusedInput(focusedInput)}
isOutsideRange={isOutsideRange}
onClose={handleOnClose}
withPortal={true}
customInputIcon={label}
hideKeyboardShortcutsPanel={true}
/>
react-dates version
21.8.0
Describe the bug
I use the "DateRangePicker" component in a project and I need to test the user flow with the Testing Library. The problem is that when I do the first click (userEvent.click()), on the first date, the modal is closed, not waiting for the selection of the second date.
Source code (including props configuration)
Steps to reproduce the behavior: