[DatePicker] Fix previous input value issues#4383
[DatePicker] Fix previous input value issues#4383yyq1025 wants to merge 4 commits intomui:masterfrom
Conversation
|
These are the results for the performance tests:
|
|
@yyq321 for mui/material-ui#4358, on desktop, when using |
|
@flaviendelangle thanks for reminding me.
Therefore, on |
|
@yyq321 thanks for your detailed feedback I am trying to clarify this behavior in mui/material-ui#4408 |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
I'm not sure about this: This feels nice when you first select a date, but when you open a picker for the second time, you probably want to correct an error you did the first time. "Open-> fix day -> click away -> picker closes" ist a very convinient way and feels "natural". "Open -> fix the day -> reclick the selected hour -> reclick the selected minute -> picker closes" is annoying. I would also argue that there is no use case for cancelling an accidential selection on desktop, as you can always change it. Cancelling feels more like a 90ies Wizard UX than a modern immediate-visual-feedback-change-as-you-go approach Last but not least: usually, the value will be shown in the connected TextArea and be updated immediatly while you change the pickers, as shown in the second video here. So the UX metaphor is "selecting is equivalent to typing", as the field updates the same way as if i type in there. But: No TextArea ever clears/resets when i click away. So neither should the pickers selection. |
|
@BGehrels can we continue this discusson on mui/material-ui#4408 ? |
|
@flaviendelangle do you mean PR #4408 instead of the issue mui/material-ui#4408 ? |
|
Closing this one if favor of #4408 |
Re-open mui/material-ui#31929 here
fixes #4478, fixes #4469
not sure whether mui/material-ui#4358 is really a bug. I think people need a way to cancel their selections on the desktop.
#4478 and #4469 are caused by calling
setInitialDatewhenever we close the picker. This design could not handle the input change after closing. Instead, we should callsetInitialDatejust before the picker opens.