DateRangePicker

Markdown

A date range field with a pop-up calendar that works from the keyboard.

Use it for
A date range inside a form or filter bar.
Not for
A large always-visible calendar. Try Calendar.

DateRangePicker preview

Loading example…

Installation

npm install @stackunseen/ui
import { DateRangePicker } from '@stackunseen/ui/application';
Styles: @stackunseen/ui/styles.css and @stackunseen/ui/application.css

Usage and props

Import this component from @stackunseen/ui/application. Load @stackunseen/ui/styles.css first, then @stackunseen/ui/application.css.

Keep the range, displayed month and popup disclosure in your app. Selection is acknowledged when you update value. Keep the range, and whether the calendar is open, in your app. A range can’t include disabled dates; check your date rules again when the form is submitted.

valueDateRange
Date-only start and end, each nullable while choosing a range.
onValueChange(range: DateRange) => void (optional)
Requests the chosen or cleared range.
openboolean
Whether the calendar popup is visible.
onOpenChange(open: boolean) => void
Accept a requested open or close.
monthDateOnly
Controlled displayed month; onMonthChange requests a change.
onMonthChange(month: DateOnly) => void
Update the displayed month.
localestring
Formatting locale. labels and calendarLabels translate the interface text.
labelstring (optional)
Visible field label. Defaults to the component label.
How state and callbacks work
All props

Loading…

For your coding agent

Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.

Contract
value · onValueChange? · month · onMonthChange · open · onOpenChange · locale
Keeps honest
Keep the range, and whether the calendar is open, in your app. A range can’t include disabled dates; check your date rules again when the form is submitted.
MCP
read_component "DateRangePicker" on the docs endpoint
Open the Markdown file

Keyboard and customization

Keyboard

Opening focuses the calendar. Escape closes and returns to the trigger; Clear and Done are labeled actions.

Customization

Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio