Components
Date Picker
A field that opens a calendar: one date, or a range previewed as you point. Dates are "YYYY-MM-DD" strings, so they never shift with time zones.
Import
import { DatePicker, DateRangePicker } from '@rinzai/zen';Examples
Range
A trip: the start, then the end, across two months. Closes once both are picked.
In field
In a Field: the label, hint and error are wired to the picker. Only dates from today on.
When the plan begins.
API reference
<DatePicker>
Date field: shows the date ("Sep 30, 2026" for the locale) and opens a Calendar to pick one, focused on the chosen date so the keyboard works at once. Dates are "YYYY-MM-DD" strings. With onClear, the popup also offers clearLabel to empty it.
| Prop | Type | Default |
|---|---|---|
localeRequiredDecides the date format, month and weekday names, and the first day of the week, e.g. "en-IN". | string | — |
onChangeRequired | (date: string) => void | — |
valueRequired"YYYY-MM-DD", or null for none. | string | null | — |
classNameClasses for the trigger (e.g. a width, instead of the default full width). | string | — |
clearLabel | string | Clear |
isDisabledDates that can't be picked, e.g. weekends or booked days. | ((date: string) => boolean) | — |
maxLatest date that can be picked. | string | — |
minEarliest date that can be picked ("YYYY-MM-DD"). | string | — |
onClearOffers a clear option in the popup (shown when a value is set). | (() => void) | — |
placeholder | string | Pick a date |
weekStartsOn0 for Sunday … 6 for Saturday. Defaults to the locale's. | number | — |
<DateRangePicker>
Date range field: pick a start and then an end in a Calendar (the days between are previewed while pointing); it closes once the range is complete. Shows the range the locale's way, e.g. "Sep 3 – 10, 2026".
| Prop | Type | Default |
|---|---|---|
localeRequiredDecides the date format, month and weekday names, and the first day of the week, e.g. "en-IN". | string | — |
onChangeRequired | (range: DateRange) => void | — |
valueRequiredThe range; | DateRange | null | — |
classNameClasses for the trigger (e.g. a width, instead of the default full width). | string | — |
clearLabel | string | Clear |
isDisabledDates that can't be picked, e.g. weekends or booked days. | ((date: string) => boolean) | — |
maxLatest date that can be picked. | string | — |
minEarliest date that can be picked ("YYYY-MM-DD"). | string | — |
monthsMonths shown side by side (2 suits wide screens). | number | 1 |
onClearOffers a clear option in the popup (shown when a value is set). | (() => void) | — |
placeholder | string | Pick dates |
weekStartsOn0 for Sunday … 6 for Saturday. Defaults to the locale's. | number | — |