API and Development
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.
| Prop | Meaning |
|---|---|
label | Required name of the group. |
rangeLabels | Start and end, heard before the label. |
segmentLabels | Legacy segment names (API compatibility). The trigger is read-only; dates are chosen on the calendar. |
timeSegmentLabels / timeFieldLabels | With type DateRangeInputType.DateTime, names for clock segments in the panel. |
calendarLabel | The button that opens the calendar. |
value / defaultValue | { start, end } of local Dates, or null. |
onValueChange | Next value and details.reason. |
allowPartialRange | Reports a range with null for an empty end. |
minDate / maxDate / disableFuture | Bounds for both ends. |
applyLabel, resetLabel | Required on every field. Reset and Apply on the calendar popover; day presses change a draft until Apply. |
isDateDisabledForMode | Per-mode disable; use createAdvancedDateRangeDisabledForMode for ui-calendar past/future flags. |
applyLabel, resetLabel | Required LocalizedMessage labels. Reset restores the value and mode held when the popover opened, and stays open. Apply commits the draft and closes and is the only primary action. Escape and an outside press close without committing. |
clearLabel | When set, Clear empties the draft and stays open. |
modes, modeSelectLabel | Before, After, and Between as { mode, label }[] in the panel (mode control is a combobox). Requires modeSelectLabel, applyLabel, and resetLabel. One modes entry hides the strip. |
mode | Controlled Before, After, or Between while modes is set. Omit it and the mode follows the value, then defaultMode. |
defaultMode | Mode shown while the value has no end yet. Defaults to Between when that mode is offered. |
onModeChange | Called when the mode changes from the panel or the field select. |
startName / endName | Submit each end as yyyy-MM-dd with a form; an empty end submits an empty string (After leaves endName empty; Before leaves startName empty). |