Skip to content

createDailyRange · <tz-daily-range> ​

Options ​

OptionTypeDefault
valueDailyRangeValueEMPTYTwo dates and two clock times: the days, and the hours on each of them.
timeLayoutTimeLayout'input'How the two hours are chosen. 'input' by default: two lists of forty-eight buttons are a long way to say 09:00. 'list' is the right one when the times on offer are the point — opening hours, say.
hour12boolean | undefined—12-hour fields with an AM/PM button; the locale decides when unset.
minuteStepnumber1With 'select': minutes between the options. Every minute by default.
timeZonestring'UTC'An IANA identifier. The hours are read on the clocks of this zone.
stepMinutesnumber30Minutes between the times offered.
minTimePlainTime | string | undefined—The first and last times offered in the two lists.
maxTimePlainTime | string | undefined—The latest time offered.
firstDayOfWeekWeekday | undefined—Where the week starts, 1 for Monday through 7 for Sunday. Left out, the locale decides — Monday in France, Sunday in the United States. Set it only where a business disagrees with its own locale.
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.
minPlainDate | nullnullThe earliest day that can be chosen.
maxPlainDate | nullnullThe latest day that can be chosen.
isDateDisabled((date: PlainDate) => boolean) | undefined—Rules out individual days inside the range: closures, weekends, days already full.
renderCellRenderCell | undefined—Adds to each day: a note under the number, a class of your own, a tooltip, or a reason to rule it out.
todayPlainDateTemporal.Now.plainDateISO()Which day is today. Settable so a test does not depend on the day it runs.
disabledbooleanfalseNothing can be chosen while this is set.
messagesTzslotMessagesENThe words the widget says. One bundle, English and French included.

Callbacks ​

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

MIT