**Describe the problem** In Cockpit we have a test where we enter an invalid date into the date picker which leads to no date being selected when opening the datePicker:  When I add a breakpoint to the line above of where the exception happens, I noticed the focusTrap basically tries to execute ``` document.querySelector('.pf-v5-c-calendar-month__dates-cell.pf-m-selected'); ``` Which returns null. I've found out that reverting [this commit](https://github.com/patternfly/patternfly-react/commit/3707ffb2d8) no longer throws a JavaScript error. **How do you reproduce the problem?** I've had issues with reproducing the problem in a codesandbox, our [Datepicker usage](https://github.com/cockpit-project/cockpit/blob/main/pkg/lib/serverTime.js#L598) is a bit non-trivial. **Expected behavior** A component should never throw an JavaScript exception. **Is this issue blocking you?** Currently we have no workaround, except disabling the test for now. **What is your environment?** - OS: Linux - Browser chrome - Version