Skip to main content

Configure the following properties on the timePicker component.

Configure the following properties on the time picker component.

string

A unique identifier for the element.

Anchor to value
value
string
Default: ''

Current selected value.

The default, '', means no time is selected.

The value must be a 24-hour time in HH:mm:ss format, with leading zeros.

Examples: "00:00:00", "09:05:00", "23:59:00", "14:03:30".

This follows the HTML time input value format, which is always 24-hour with leading zeros regardless of UI presentation.

See: https://developer.mozilla.org/docs/Web/HTML/Element/input/time

If the provided value is invalid, '' is used as the value.


The timePicker component provides event callbacks for handling user interactions. Learn more about handling events.

The time picker component provides event callbacks for handling user interactions. Learn more about handling events.

(event: <"s-time-picker">) => void

Callback when the time picker is dismissed.

Anchor to change
change
(event: <"s-time-picker">) => void

Callback when the user selects a time from the picker that is different to the current value.

Anchor to focus
focus
(event: <"s-time-picker">) => void

Callback when the time picker is revealed.

Anchor to input
input
(event: <"s-time-picker">) => void

Callback when the user selects a time from the picker.



  • Choose for visual time selection: Use timePicker when users benefit from a visual picker interface. Use timeField when users know the exact time.
  • Use correct format: Always use HH:mm:ss format with leading zeros. The internal format is always 24-hour regardless of UI presentation.
  • Validate before setting values: Invalid values reset to empty string. Implement validation to show appropriate error messages.

Was this page helpful?