Skip to content

[pickers] Refactor TimeClock value management #17016

Open
@LukasTy

Description

@LukasTy

Created from #16853 (comment).

The current behavior is slightly strange, because it is "optimized" solely for touch users.
This optimization creates an exception for value management.
If we could avoid this behavior, the code could be simplified.

When the Time Clock value is being dragged - you no longer get a preview of the current selected value, only what you are trying to change the value to.
This behavior reveals inconsistency between Digital and Analog clocks, because on digital when navigating with keyboard, the currently selected value remains selected, only confirming the selection changes the selection.
The same can be said about date range calendar range dragging - the currently selected value is always visible.

We have discussed a few options for this behavior/DX:

  1. Keep it as is
  2. Refactor value management to no longer update the toolbar value as the analog clock is being dragged.
    This could create the need to have the above-mentioned selected and selecting states visually.
    This behavior has a con that it differs from the Material spec/design.
  3. Fire onChange on every hour/minute step change.
    Currently, the onChange is fired only after touch ends.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: TimePickerThe React component.component: pickersThis is the name of the generic UI component, not the React module!designThis is about UI or UX design, please involve a designerenhancementThis is not a bug, nor a new featuremobileTargets mobile platform

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions