-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Usability issues in DateField/DatePicker #5364
Comments
Thanks for the feedback!
Wouldn't the leading zero get cleared on blur of the segment anyway? I can see how the user might be confused that the input didn't update, so there is an argument for that. Maybe this is more important if leading zeros need to persist in some locales.
This seems like a good enhancement.
I think this would be good behavior, but probably needs some more discussion. I think this would only make sense if the
This would be a good enhancement, and we could use
This is a difficult one since I don't think there is a way to select multiple inputs at once. We could consider another key combination that could clear the entire field, however.
I don't think we'll want to change this behavior. Users are going to be accustomed to using left/right to go to the next/previous segments so this would be a big change. Users can use up/down arrows or can clear and type to edit fields, so I don't think the user experience would be improved. |
The issue is that when showing the pattern "dd-mm-yyyy" for the user, it explicitly tells to have the leading zeros. If they are not required, the pattern should be "d-m-yyyy". This at least the interpretation in fi-FI locale and there is a difference if you have one or two letters. Now if the user notices that two digits are required, it is very confusing that visually nothing happens although there is a behavioral difference: when typing
Even if there is an earlier typed value filled in the field, one could expect that by backspacing it is possible to empty the whole date. If the cell automatically jumps forward, it should also jump backwards - or do nothing in both cases. So basically when the cell is empty and you still press backspace, it should remove the last digit from the previous cell and jump to that cell. |
I should have used segment here instead of field. |
Backspace can now be used to move previous segment, although one additional keystroke is required compared to a traditional text field. #5715 |
To shorten this list, I have the following implementation suggestion for the topic "Typing a separator should move to the next segment". There could be a new internal state variable inside With this addition, the following rule could be implemented: If the user has typed a value and after that types any of these characters I would like to allow all those characters because especially with mobile devices, the keyboard does not show all relevant characters in numerical input mode and you could, for example, use always a dot to move to the next segment. Two examples, locale with format dd.mm.yyyy is expected:
Notice especially the behavior in the second case: you can always type the separator but as the month field either contains a placeholder value or existing value which is not changed, the focus remains in the month segment instead of jumping to the year segment. User can always type the separator character regardless of the number of digits in the segment. What is your opinion @reidbarber and @devongovett ? I'd be happy to open a PR for this if you agree with the details. |
Provide your feedback here.
The documentation writes the following:
Accessible – Each date and time unit is displayed as an individually focusable and editable segment, which allows users an easy way to edit dates using the keyboard, in any date format and locale.
However, after my experiences of using DateField/DatePicker, I've found the following issues which - at least in my opinion - decrease the usability quite a lot when user is typing the dates.
Some of these findings are only related to locales in format "dd-mm-yyyy" or "dd.mm.yyyy".
shouldForceLeadingZeros
and how it behaves without this forcing. If the locale doesn't show the leading zero, maybe the zero-digit typed by the user should be shown but could disappear after the focus changes to another cell.Typing the digits automatically moves the focus to the next cell but backspacing does not move back to the previous cell(Backspace on an empty DateSegment should focusPrevious #5261, fixed with Fix backspace to shift focus to previous element in useDateSegment #5715)useDatePicker
sometimes limits day of month to 30 #3256)🔦 Context
Users who expect that the DateField would behave more like a traditional text field will find different kind of issues which might decrease the usability of the component.
💻 Code Sample
No response
Version
October 02, 2023 Release
What browsers are you seeing the problem on?
Firefox, Chrome, Microsoft Edge
If other, please specify
No response
What operating system are you using?
Windows
The text was updated successfully, but these errors were encountered: