API and Development
DatePicker from @prepared911/ui-calendar wraps react-day-picker with Prepared layout, optional month/year Select controls via MonthCaption, and optional Apply/Reset when used behind a trigger. Modes are DatePickerMode.Single, Range, and DaysAgo.
| Name | Type | Description |
|---|---|---|
mode | DatePickerMode | Single, Range, or DaysAgo. |
value / onChange | varies | Date or { start, end } for range. |
disabled | boolean | (date: Date) => boolean | Disable entire picker or per-day. |
disableFuture | boolean | Block future dates. |
minSelectableDate / maxSelectableDate | Date | Bounds. |
hideMonthYearSelect | boolean | Use caption without month/year dropdowns. |
cta | boolean | Apply/Reset footer. |
trigger | ReactNode | Optional custom trigger; omit to render calendar body only. |
open / onOpenChange / onClose | Controlled popover when trigger is set. | |
onApply / onReset | Work with cta and external state. |
DaysAgo mode additionally requires daysAgo: number.
On this page