ortaui
  1. Components
  2. Date and time

Date Picker

DatePicker and DateRangePicker: a Select-like pill trigger that opens a Calendar in a popover. Surface-aware.

Installation#

npx shadcn add @ortaui/date-picker

Examples#

Single#

Range#

Disabled and invalid#

On a surface#

API reference#

PropTypeDefaultDescription
surface"default" | "raised"autoLook on a panel. Unset: raised (page fill + border) inside any [data-surface] container. "raised" forces it anywhere; "default" keeps the muted fill even inside a surface.
value / defaultValueDate | DateRange-Controlled or uncontrolled. DateRange is { from?, to? } from react-day-picker.
onValueChange(value) => void-Called when the selection changes.
format(date: Date) => stringmedium dateFormats the trigger label.
placeholderstring-Trigger text while empty.
namestring-Adds hidden ISO inputs (name, or name-from and name-to for a range).
calendarPropsCalendarProps-Forwarded to Calendar (disabled days, locale, caption).
numberOfMonthsnumber2DateRangePicker only.