Time Picker
Allow users to select a specific time.
Anchor to propertiesProperties
- string
A unique identifier for the element.
- Anchor to valuevaluestringDefault: ''
Current selected value.
The default,
''
, means no time is selected.The value must be a 24-hour time in
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?
Anchor to eventsEvents
- Anchor to blurblur(event: CallbackEvent<"s-divider">) => void
- Anchor to changechange(event: CallbackEvent<"s-divider">) => void
- Anchor to focusfocus(event: CallbackEvent<"s-divider">) => void
- Anchor to inputinput(event: CallbackEvent<"s-divider">) => void
CallbackEvent
- bubbles
boolean
- cancelable
boolean
- composed
boolean
- currentTarget
HTMLElementTagNameMap[T]
- detail
any
- eventPhase
number
- target
HTMLElementTagNameMap[T] | null
interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
currentTarget: HTMLElementTagNameMap[T];
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
detail?: any;
eventPhase: number;
target: HTMLElementTagNameMap[T] | null;
}
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} />
Examples
Code
Default
<s-button command="--show" commandFor="time-picker"> Show </s-button> <s-time-picker value="9:41" id="time-picker" onChange={onTimeChange} />
Preview
