MobileDateTimePicker API: Enter date and time with the keyboard #11035
Labels
component: pickers
This is the name of the generic UI component, not the React module!
duplicate
This issue or pull request already exists
Summary 💡
I'm working with MUI's MobileDateTimePicker and encountering a couple of issues with its functionality. I want users to be able to manually enter a date and time into the TextField. However, the picker dialog currently opens whenever the TextField gains focus, which is not the desired behavior. I want the date and time picker to only appear when the user clicks the calendar/clock icon at the end of the TextField.
Here's a conceptual breakdown of the desired behaviors:
The user clicks on the TextField and is able to type in a date and time directly using the keyboard.
The picker dialog (calendar and clock form) should only open when the user clicks the icon on the right side of the text form, not when the TextField itself is clicked or focused.
Currently, I am using the standard MobileDateTimePicker implementation, but it seems to lack an option to differentiate between focusing the TextField for keyboard input and clicking the icon to open the picker dialog.
This is my code:
Examples 🌈
Desired Behavior: I want to enable users to input the date and time manually through the keyboard when they click on the TextField. The picker dialog should only open when the user clicks on the calendar/clock icon adjacent to the TextField:
Motivation 🔦
Currently, I am using the standard MobileDateTimePicker implementation, but it seems to lack an option to differentiate between focusing the TextField for keyboard input and clicking the icon to open the picker dialog.
Search keywords: MobileDateTimePicker, keyboard input
The text was updated successfully, but these errors were encountered: