Skip to content
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

Blur Input Field Automatically After Date Selection in DatePicker #1159

Closed
wants to merge 1 commit into from

Conversation

asinghka
Copy link

@asinghka asinghka commented Jan 7, 2025

This change should ensure that the input field in the DatePicker loses focus automatically after a date is selected. On devices with on-screen keyboards, it can be annoying when the input field remains focused, causing the keyboard to open unnecessarily after the user has already selected a date.

Note: This change has not been tested at all and should be thoroughly verified before merging.

@jquense
Copy link
Owner

jquense commented Jan 25, 2025

Hi there, thanks for PR but this isn't an acceptable solution to your problem. focusably dropping focus from inputs is hostile to keyboard and screen reader users. A better option for you would be to set readOnly on the input for mobile screens so that the keyboard doesn't open at all and users can just use the calendar picker

@jquense jquense closed this Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants