Date Picker
Zero-dependency date picker and inline calendar supporting single dates, date ranges, quick month switching, and tabular monospace formatting.
Single Date Picker
Zero-dependency date picker with tabular mono formatting, quick month switcher, and Today/Clear controls.
date-picker-example.tsx
ISO: 2026-12-01
Size
Date Range Mode
Select a start and end date with live hover range preview — ideal for tour runs and studio bookings.
date-range-example.tsx
Standalone Inline Calendar
Use the exported Calendar primitive directly inside sidebars, booking sheets, or gig schedules.
calendar-inline.tsx
Su
Mo
Tu
We
Th
Fr
Sa
Quick Import
Example.tsxtsx
1import { useState } from "react";2import { DatePicker, Calendar } from "@rekodo/react";3
4export function Example() {5 const [date, setDate] = useState<Date | null>(new Date());6 return (7 <DatePicker8 value={date}9 onValueChange={setDate}10 placeholder="Pick release date..."11 />12 );13}API Reference
Props accepted by this component.
| Prop | Type | Default | Description |
|---|---|---|---|
| mode | "single" | "range" | "single" | Single date selection or start/end range selection. |
| value / defaultValue | Date | null | null | Controlled or uncontrolled selected date (single mode). |
| onValueChange | (date: Date | null) => void | undefined | Fires when the selected date changes in single mode. |
| range / defaultRange | DateRange | {} | Controlled or uncontrolled { from?, to? } range (range mode). |
| onRangeChange | (range: DateRange) => void | undefined | Fires when the date range changes in range mode. |
| minDate / maxDate | Date | undefined | Lower and upper selectable date bounds. |
| fromYear / toYear | number | 1900 / 2100 | Year bounds for the scrollable year picker grid. |
| isDateDisabled | (date: Date) => boolean | undefined | Custom predicate to disable specific dates. |
| weekStartsOn | 0 | 1 | 0 | First day of the week (0 = Sunday, 1 = Monday). |
| locale | string | "en-US" | BCP 47 locale passed to Intl.DateTimeFormat. |
| formatDate | (date: Date) => string | undefined | Custom date formatter for the trigger label. |
| closeOnSelect | boolean | true | Automatically closes the popover once selection completes. |
| clearable | boolean | true | Shows a clear button on the trigger when a date is selected. |
| size | "sm" | "default" | "lg" | "default" | Trigger height and typography scale. |
| accent | "violet" | "rose" | "violet" | Selected day, range highlight, and focus accent. |
| invalid / disabled | boolean | false | Validation or disabled state. |