Skip to content

createTimeSlots · <tz-time-slots> ​

Options ​

OptionTypeDefault
datePlainDate | string | nullnullThe day to list. Nothing is drawn until there is one.
timeZonestring'UTC'An IANA identifier — 'Europe/Paris', not an offset. Offsets change twice a year.
stepMinutesnumber30Minutes between the times offered.
minTimePlainTime | string | undefined—The working day. Slots outside it are not produced at all — eighteen greyed rows before nine o'clock make the real choices harder to find.
maxTimePlainTime | string | undefined—The latest time offered.
isDisabled((slot: Omit<Slot, 'disabled'>) => boolean) | undefined—Rules out slots while still showing them: booked, over capacity.
skipNonExistentbooleanfalseLeave out the times that cannot happen, rather than striking them through.
disabledbooleanfalseNothing can be chosen while this is set.
valueInstant | nullnullThe selection, as a moment — never a wall time.
ariaLabelstring | undefined—The accessible name, for a screen reader.
missingLabelstring | undefined—The word under a time the clocks skip. Short: it sits inside a button.
emptyLabelstring | undefined—What is said when the day offers nothing at all.
messagesTzslotMessagesENThe words the widget says. One bundle, English and French included.

Callbacks ​

Type
onChange((value: Instant | null) => void) | undefinedCalled when the user chooses, changes or clears the value.

MIT