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

Date range

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
A start and end date is DateRangeInput from @prepared911/ui/date-range-input. modes offers Before, After, and Between. One entry hides the mode control and shows only the end that mode uses. More than one shows the control. An uncontrolled mode follows the value, including after the form resets. Closing without Apply keeps the mode an empty value already shows. The calendar grid is Calendar; this field owns the popover.
Props
PropMeaning
labelRequired name of the group.
rangeLabelsStart and end, heard before the label.
segmentLabelsLegacy segment names (API compatibility). The trigger is read-only; dates are chosen on the calendar.
timeSegmentLabels / timeFieldLabelsWith type DateRangeInputType.DateTime, names for clock segments in the panel.
calendarLabelThe button that opens the calendar.
value / defaultValue{ start, end } of local Dates, or null.
onValueChangeNext value and details.reason.
allowPartialRangeReports a range with null for an empty end.
minDate / maxDate / disableFutureBounds for both ends.
isDateDisabledForModePer-mode disable; use createAdvancedDateRangeDisabledForMode for ui-calendar past/future flags.
confirmRequires applyLabel and resetLabel. Reset restores the value and mode held when the popover opened, and stays open. Clear, when clearLabel is set, empties the draft and stays open. Escape and an outside press close without committing. Apply is the only primary action.
modesBefore, After, and Between. One mode hides the control. Requires confirm, modeSelectLabel, applyLabel, resetLabel, and clearLabel.
modeControlled Before, After, or Between while modes is set. Omit it and the mode follows the value, then defaultMode.
defaultModeMode shown while the value has no end yet. Defaults to Between when that mode is offered.
onModeChangeCalled when the mode changes from the panel or the field select.
Import
Example
Previous
Advanced Date Range Picker / Usage
Next
Advanced Date Range Picker / Accessibility
On this page
Props
Import
Example