Date Picker

A calendar surface plus two ready pickers, single date and range, over Radix Popover with native Date math and no date dependency. Selection reads the brand accent; the in-range fill stays neutral.

Installation#

# One-time setup (tokens + lib helpers)npx koalaui-cli@latest init# Add this component (its dependencies come along)npx koalaui-cli@latest add date-picker

Usage#

usage.tsxTSX
import { DatePicker } from "@/components/ui/date-picker"export function Example() {  const [date, setDate] = React.useState<Date>()  return <DatePicker value={date} onChange={setDate} />}

Calendar#

The Calendar is the standalone grid the pickers wrap. Use it directly when you need an always-open calendar. The caption cycles day → month → year views; arrow keys move the focused day, PageUp/PageDown move a month, Home/End jump to the week edges.

October 2026

Range selection#

Set mode="range" to select a { from, to } span. The first click sets the start, the second closes the range; hovering previews the span. Show multiple months with numberOfMonths.

October 2026, November 2026
October 2026
November 2026

Presets#

Pass presets to render a quick-pick rail. Use presets (boolean) for the built-in set, or pass your own array. The single-date set ships getDatePresets(); the range set ships getDateRangePresets() with eleven common spans (Today, Last 7 days, This month, Last year, …).

Range with presets#

The combination most analytics surfaces want: a two-month range picker with the full preset rail.

Sizes#

Constraints#

Bound the range with min / max, or disable arbitrary days with isDateDisabled. Disabled days are inert and struck through.

Density#

Like the rest of Koala, the calendar honors density: compact tightens cells and controls for dense application UI.

Inside a Field#

Drop a picker inside a Field and it auto-wires the label, hint, id, and error/disabled state, with no manual props.

Your subscription begins on this date.

FAQ#

Use Calendar when you need an always-open grid inline on the page, such as a booking surface or a sidebar. DatePicker and DateRangePicker wrap that same Calendar in a Radix Popover with a trigger, so prefer them whenever the calendar should open from a field-like button.