Skip to content

createTimeSelect · <tz-time-select> ​

Options ​

OptionTypeDefault
valuePlainTime | nullnullThe time shown, as a clock face rather than a moment.
offsetstring | nullnullWhich of the two readings of a repeated hour the value stands for, as a UTC offset. Only ever set on the day the clocks go back.
datePlainDate | string | nullnullThe day the time is on, and the zone it is read in. Given both, the menus show that day as it really is: the hour the clocks skip is not offered, and the hour they repeat is offered twice, by its two offsets. Left out, they offer every hour of an ordinary day.
timeZonestring | undefined—An IANA identifier — 'Europe/Paris', never an offset. Offsets change twice a year.
minuteStepnumber1Minutes between the options. Every minute by default.
readingStyle'named' | 'marked''named'How the two readings of a repeated hour are told apart in the list. 'named' writes them out — "02 — winter" — which is unmistakable and widens the menu to the length of the longest word in the language. Inside a field standing beside another, that width is a hole on every ordinary day of the year, so 'marked' stars the second reading instead and leaves the naming to a line underneath.
hourStepnumber1Hours between them.
minTimePlainTime | string | undefined—The earliest time offered.
maxTimePlainTime | string | undefined—The latest time offered.
hour12boolean | undefined—12-hour menus with an AM/PM one beside them; the locale decides when unset.
localestring | undefined—A BCP-47 tag for the month and weekday names, and the order of a date. The browser's own when left out.
disabledbooleanfalseNothing can be chosen while this is set.
messagesTzslotMessagesENThe words the widget says. One bundle, English and French included.

Callbacks ​

Type
onChange((value: PlainTime | null, offset: string | null) => void) | undefinedThe time chosen, and which reading of it when the hour happens twice.

MIT