Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Calendar
  2. Date Picker
  3. API and Development

Date Picker

API and Development

View Source
Submit Issue

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.

Props (by mode)

NameTypeDescription
modeDatePickerModeSingle, Range, or DaysAgo.
value / onChangevariesDate or { start, end } for range.
disabledboolean | (date: Date) => booleanDisable entire picker or per-day.
disableFuturebooleanBlock future dates.
minSelectableDate / maxSelectableDateDateBounds.
hideMonthYearSelectbooleanUse caption without month/year dropdowns.
ctabooleanApply/Reset footer.
triggerReactNodeOptional custom trigger; omit to render calendar body only.
open / onOpenChange / onCloseControlled popover when trigger is set.
onApply / onResetWork with cta and external state.

DaysAgo mode additionally requires daysAgo: number.

Import

Inline calendar

Previous

Date Picker / Usage

Next

Date Picker / Accessibility

On this page

Props (by mode)
Import
Inline calendar