Skip to content

Data Input

DateRangeInput

Segmented start/end date field with range calendar.

import { DateRangeInput } from '@var-ui/react';
Trip
–

DateRangeInput

Start/end date field with segmented entry for both sides and a popover range calendar. The controlled value is a range object { start, end } of @internationalized/date values (typically CalendarDate), not two separate props.

Examples

Default

Seed both ends with defaultValue={{ start, end }}.

Trip
–
Demo.tsxTSX
import { CalendarDate } from '@internationalized/date';
import { DateRangeInput } from '@var-ui/react';

<DateRangeInput
  label="Trip"
  defaultValue={{ start: new CalendarDate(2026, 8, 10), end: new CalendarDate(2026, 8, 20) }}
/>

Controlled range

Drive selection with value / onValueChange. onValueChange receives the full range (or null when cleared).

Trip
–
Demo.tsxTSX
import { CalendarDate } from '@internationalized/date';
import { DateRangeInput } from '@var-ui/react';

<DateRangeInput
  label="Trip"
  value={{ start: new CalendarDate(2026, 8, 10), end: new CalendarDate(2026, 8, 20) }}
  onValueChange={setValue}
/>

Sizes

size (sm, md, lg) sets the segment group height, inset and type, matching TextField, and scales the calendar trigger. It falls back to the surrounding control size (InputGroup, Toolbar, Select.Root), then md.

Props

Accessibility

Built on React Aria DateRangePicker. Start and end each expose month/day/year spinbutton segments; the trigger opens a dialog with a range calendar grid. Keep label visible, and use description / errorMessage for helper and validation text announced with the field.