Skip to main content

TimePicker

Allow users to select a specific time.

string

A unique identifier for the element.

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.

Was this section helpful?

(event: <"s-divider">) => void
(event: <"s-divider">) => void
(event: <"s-divider">) => void
(event: <"s-divider">) => void
Was this section helpful?

Code

<s-button command="--show" commandFor="time-picker">
Show
</s-button>
<s-time-picker value="9:41" id="time-picker" onChange={onTimeChange} />

Preview