-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[DatePicker] Add keyboard support to inline mode #4945
Conversation
[docs] Add v0.15.3 to the versions.json
@caesay Nice PR! I just had one issue. When we change the date through keyboard and hit |
@aahan96 I've added a commit which handles the enter key. |
hintText="Keyboard Enabled Dialog" | ||
container="inline" | ||
mode="landscape" | ||
keyboardEnabled={true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have seen other places in the code where props like these are alphabetically sorted. Is that a convention? Should it be done here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicolaiskogheim propType declarations are definitely alphabetical. I don't know about prop assignments, but either way this is just the docs file and the previous examples don't follow this rule either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, thanks.
When
container=inline
andkeyboardEnabled=true
on a datepicker component, this enables keyboard support. You can tab in, type a date, tab out. Also, clicking directly on the control also focuses the textbox.I'm re-using the date state variable for the current textbox value as well as the stored date object, if this needs to be changed let me know how you would like it to be implemented instead.
Issue #4219 should likely also be looked at in this pull request to ensure that the popup calendar doesn't hide the textbox while it has focus.(fixed with b3ed601)Closes mui/mui-x#6232