Skip to content
Data Input

DateInput

Segmented date field with calendar popover.

DateInput

Single-date field with segmented text entry (month/day/year) plus a trigger that opens a popover month calendar. Values use @internationalized/date (CalendarDate).

Examples

Default

Pass a label and seed with defaultValue (or control via value / onChange).

Date
Demo.tsxtsx
import { CalendarDate } from '@internationalized/date';
import { DateInput } from '@var-ui/react';

<DateInput label="Date" defaultValue={new CalendarDate(2026, 8, 12)} />

Description and error

Use description for helper copy and errorMessage for validation — setting errorMessage marks the field invalid.

Deadline
Must be a weekday
Demo.tsxtsx
import { CalendarDate } from '@internationalized/date';
import { DateInput } from '@var-ui/react';

<DateInput
  label="Deadline"
  description="Must be a weekday"
  errorMessage="Pick a weekday"
  defaultValue={new CalendarDate(2026, 8, 15)}
/>

Props

Accessibility

Built on React Aria DatePicker. Each date segment is a focusable spinbutton; the calendar trigger is a labeled button that opens a dialog with a keyboard-navigable grid. Keep label visible, and use description / errorMessage so assistive tech gets the same help and validation copy as sighted users.