Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Calendar
  2. Date Picker
  3. API and Development

Date Picker

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Calendar from @prepared911/ui/calendar is the date grid. It wraps @daypicker/react and uses local Date values. A field that edits a date is DateInput, not this grid. The grid does not take a trigger or own a popover; the field does. Modes are CalendarMode.Single, CalendarMode.Range, and CalendarMode.DaysAgo.
Props
NameTypeDescription
modeCalendarModeSingle, Range, or DaysAgo.
value / onValueChangelocal Date or a rangeA range reports when both ends are picked, unless allowPartialRange is set.
disabledboolean or (date: Date) => booleanDisable the grid or individual days.
disableFuturebooleanBlock future dates.
minDate / maxDateDateBounds.
minRangeDays / maxRangeDaysnumberRange length limits.
captionLayoutDropdown or LabelMonth and year selects, or a label.
confirmapply and reset labels plus handlersApply commits through onValueChange. Reset restores the committed value.
locale / weekStartsOnDay and weekday text. With no locale, the nearest locale provider is used.
previousMonthLabel / nextMonthLabelLocalizedMessageAccessible names for the month controls.
DaysAgo still selects a number of days before today. There is no DatePickerMode enum.
Import
Inline calendar
Previous
Date Picker / Usage
Next
Date Picker / Accessibility
On this page
Props
Import
Inline calendar