What broke
In a single date picker, I could type a date and press Enter to dismiss the calendar. Clicking the input again did nothing until focus moved away. The handler had removed the open CSS class while flatpickr still considered the calendar open. Escape had the same mismatch.
How I tested it
I wrote a React interaction test that clicked the input, typed a date, pressed Enter, and clicked again. The final assertion failed on main: the calendar should have reopened. During review I added Escape coverage for the single and range pickers. The focused Jest run passed all 102 tests across three DatePicker suites. These were jsdom interaction tests.
What the maintainer merged
On November 25, 2026, kennylam merged the change to call flatpickr’s close() when an open calendar is dismissed. That keeps the visible calendar and its internal state in sync. A regression test also checks that pressing Escape on an already closed picker does not fire onClose.