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 | Day, month, and year for both ends. |
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. |
confirm | Requires applyLabel and resetLabel. Reset restores the draft and the mode held when the popover opened, and stays open. Escape and an outside press close without committing. |
modes | Before, After, and Between. One mode hides the control. Requires confirm, modeSelectLabel, applyLabel, resetLabel, and clearLabel. |