Skip to content

Date range picker

Accepts a date range that you type or select from a calendar popover.

Trip dates
date-range-picker-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Unavailable dates

A range cannot include an unavailable date unless you set allowsNonContiguousRanges.

Trip dates
Choose dates in June. June 18–19 are unavailable.
date-range-picker-limits-demo.tsx

Presets

Report period
date-range-picker-presets-demo.tsx

Disabled

Billing period
date-range-picker-disabled-demo.tsx

Sizes

date-range-picker-sizes-demo.tsx

API reference

vip/ui adds or changes the props below. For all other props, see React Aria DateRangePicker (opens in a new tab).

size: "xs" | "sm" | "md" | "lg" | "xl" = "lg"
Sets the size of the field and of the calendar button.
presets: DateRangePickerPreset[]
Shortcuts beside the calendar, such as Last 7 days. Each has a label and a start and end value. A preset sets the value and closes the calendar.
label: string
Label above the field. Without a label, pass aria-label.
description: string
Help text below the field.