-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature Request]: Date picker should not open on focus (or make it optional) #9865
Comments
@theiliad any updates on when this might be addressed or suggestions of how we can address on our side? |
I've opened an issue to propose this change on the flatpickr library too flatpickr/flatpickr#2703 |
We've opened a PR on the flatpickr repo to address this: flatpickr/flatpickr#2707 |
This is also necessary to help with accessibility. Focus open should really be optional. |
Hey! Any updates about it? |
any updates? spending way too much time trying to prevent focus and subsequent opening |
@ddtbuilder Don't bother waiting for this. I don't know if the dev of this is dead or what, but a simple patch package will do the trick. Just change these lines: flatpickr/flatpickr#2703 (comment) like addressed here and it will fix the issue. |
awesome, thank you!! |
Summary
Currently, DatePicker opens on focus. Change the behaviour of DatePicker so it does not open on focus but instead only opens when the user interacts with it, either by clicking on the field with the mouse or pressing the down-arrow while the field is focussed.
If this can't/shouldn't be the default then make it optional e.g. a
focusOpens
prop that when set to false behaves as I've described.Justification
When the date picker input field is the first field in a modal dialog it is focussed automatically (as per web authoring standards) when the modal opens and thus the picker opens also, which is unexpected, annoying, distracting and can obscure some of the content of the modal.
Also, when tabbing through a large form, such as when skipping over optional fields, or navigating to a field to correct an error, if the user tabs through one or several date picker fields, this is annoying and distracting, adding cognitive load.
Desired UX and success metrics
Required functionality
Change the behaviour of DatePicker so it does not open on focus but instead only opens when the user interacts with it, either by clicking on the field with the mouse or pressing the down-arrow while the field is focussed.
Specific timeline issues / requests
No response
Available extra resources
Front-end developers
Code of Conduct
The text was updated successfully, but these errors were encountered: