<kern-time-picker>
Time field with segments (hours, minutes, optional seconds and AM/PM), form-associated. The value is HH:mm (or HH:mm:ss with seconds), empty while a segment is missing.
Keyboard per segment: Arrow Up/Down change it (minutes in step), digits type it and move on, Arrow Left/Right switch segments, Backspace clears, A/P set AM/PM, Enter submits the surrounding form. With list, a button opens a list of times (every step, at least 5 minutes; every 30 minutes when step is smaller).
Examples
Time field
Segments for hours and minutes; the value is HH:mm. Per segment: Arrow Up/Down change it (minutes in step seconds), digits type it and move on, Arrow Left/Right switch segments, Backspace clears. locale decides 12- or 24-hour display unless hour12 is set.
List, limits and seconds
list adds a button with a list of times every step (here 900 s = 15 minutes). min and max limit the time. seconds adds a seconds segment (HH:mm:ss).
Properties
ariaLabelTextstring | undefined
Accessible name when there is no visible label.
disabledboolean
errorstring | undefined
hintstring | undefined
hour12boolean | undefined
12-hour clock with AM/PM; defaults to the locale.
labelstring | undefined
labelHourstring | undefined
labelListstring | undefined
labelMinutestring | undefined
labelOutOfRangestring | undefined
Shown for a time outside min/max.
labelPeriodstring | undefined
labelSecondstring | undefined
listboolean
Button with a list of times.
localestring | undefined
BCP 47 locale; defaults to <html lang>, then the browser language.
maxstring | undefined
Latest allowed time HH:mm.
minstring | undefined
Earliest allowed time HH:mm.
namestring | undefined
noImplicitSubmitboolean
Enter does not submit the surrounding form.
readonlyboolean
requiredboolean
secondsboolean
Seconds segment.
size"md" | "sm"
stepnumber
Step in seconds for Arrow Up/Down and the list, like <input type="time"> (900 = 15 min).
valuestring
HH:mm or HH:mm:ss, empty when none.
Events
kernChangeCustomEvent<{ value: string; }>
When the time changes (complete, or cleared).
Methods
hide()hide() => Promise<void>
Closes the list.
setFocus()setFocus() => Promise<void>
show()show() => Promise<void>
Opens the list (with list).
CSS parts
controlThe field box
listboxThe popover list