Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The time picker may have an initial value, which the user can edit at any time.

States

State

Visual

 

Regular

Image Removed
Time Picker - Regular.pngImage Added

 

Hover

Image Removed 
Time Picker - Hover.pngImage Added

 

Active

Image RemovedImage Removed
Time Picker -  Active AM.pngImage AddedTime Picker - Active minutes and seconds only.pngImage AddedTime Picker -  Active PM.pngImage Added

Time Picker - Active with seconds.pngImage Added

Disabled

Image Removed
Time Picker - Disabled.pngImage Added

 

Read-Only

Time Picker - Read only.pngImage Added

Error

Image Removed
Time Picker - Error.pngImage Added

 

Warning

Image Removed
Time Picker - Warning.pngImage Added

 

Focused

Image Removed
Time Picker - Focused.pngImage Added
Image Removed
Time Picker - Focused minutes.pngImage Added
Image Removed
Time Picker - Focused seconds.pngImage Added
Image Removed
Time picker - Focused AMPM.pngImage Added

Focused, Hover

Image Removed
Time Picker - Focused Hover.pngImage Added

 

Focused, Active

Image Removed
Time Picker - Focused Active.pngImage Added

 

Focused, Disabled

Image Removed
Time Picker - Focused, Disabled.pngImage Added

 

Interaction

The time can be set either via direct input or by using the controls in the time picker menu. Additional keyboard interactions can be found under the Focus management section below.

...

  • The time picker can have an initial value, which the user can edit at any time.

  • When clicking the text, the relevant input section will be highlighted (HH, MM, or AM/PM.).
    For example:

    Image Removed

    Time Picker - Active collapsed.pngImage Added

    • When HH or MM are highlighted, only numerical value inputs will be permitted.

  • When AM/PM is clicked on, it will toggle between the two options.

  • Once an input section has been filled, the highlight will move to the next section.

  • On Apply, the time picker field will lose focus (nothing is highlighted).

  • The user should be allowed to enter times in loose formats, where possible. These should be automatically corrected when the field loses focus. For example:

    • 5 should be auto-corrected to 05.

    • when the time format is set to 12 hours, 15:08 auto-corrects to 03:08 PM.

...

  • Clicking on the clock Icon Button or any blank space will open the time picker menu.

  • The time picker menu will be closed:

    • when a time is applied, or

    • by clicking outside of the time picker menu.

  • The time inputs are cyclical:

    • When the hour is set to 12 (in 12 hour time format), the up arrow loops the value back to 01.

    • When the hour is set to 23 (in 24 hour time format), the up arrow loops the value back to 00.

    • When the minutes are set to 00, the down arrow changes the value to 59.

    • When the minutes are set to 59, the up arrow changes the value to 00.

  • When For AM/PM is clicked on, it will toggle between the two options, the arrows are not cyclical. Up arrow will change to PM and Down arrow to AM.

  • Changing the time in the menu should immediately sync the direct input displayed time

...

Unless otherwise specified, see our general compliance information in Fundamentals - Accessibility.

Focus management

Keyboard

Time picker field

Time picker menu

Image Removed

Time Picker - Focused.pngImage Added
Image Removed
Time Picker - Focused minutes.pngImage Added

Tab

  • Navigates to the next input section.

  • When on the last input section, navigates to the next component.

Navigates between the different sections in a cyclical order:

  • Hours.

  • Minutes.

  • AM/PM.

Shift + Tab

  • Navigates to the previous input section.

  • When on the first input section, navigates to the previous component.

Reverses the order of navigation described for Tab.

Space

Opens the time picker menu.

  • Hours - N/A

  • Minutes - N/A

  • AM/PM - toggles between the values.

Enter

Applies the time.

  • Applies the time.

  • Closes the menu.

Esc

N/A

Closes the menu and returns the focus to the field, without applying any changes.

Arrows

  • Up - Increases the highlighted value.

  • Down - Decreases the highlighted value.

  • Holding down the up/down keys will scroll continuously.

  • Right/Left - Moves the input highlight accordingly.

  • Up - Increases the highlighted value for the focused section.

  • Down - Decreases the highlighted value for the focused section.

  • Holding down the up/down keys will scroll continuously.

  • Right/Left - Moves the focused section accordingly.

  • Up/Down changes between AM/PM

Mouse

Time picker field

Time picker menu

Right Click

Set Focus state on field

Set Regular state on component

Design

Zeplin Link

Thumbnail

https://zpl.io/adOXdRV

Image Removed
Time picker states.pngImage Added

Code

...