-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug - [DatePicker] - [JavaScript error thrown when an invalid date is given] #9721
Comments
As we provide our own
Which is why I couldn't reproduce it in a sandbox. however the PF docs state that Meanwhile we can change our code to verify if the date is valid and if not return false. That should resolve our JavaScript error. Offtopic: splitting on |
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
Which returns null.
I've found out that reverting this commit 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 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?
The text was updated successfully, but these errors were encountered: