DS0
Components

DatePicker

Date selection component with calendar grid popover and text input.

Overview

DatePicker combines a text input with a Calendar popover. Users can type a date directly or pick from the grid. Supports date ranges, min/max constraints, and localization.

Usage

<DatePicker
  value={date}
  onChange={setDate}
  placeholder="Select date..."
/>

Date Range

<DatePicker
  mode="range"
  value={dateRange}
  onChange={setDateRange}
/>

Accessibility

  • Input has aria-haspopup="dialog"
  • Calendar grid supports full keyboard navigation
  • Calendar icon button has aria-label="Open calendar"

API Reference

PropTypeDefaultDescription
valueDate | DateRangeSelected date(s)
onChange(value: Date | DateRange) => voidChange handler
mode'single' | 'range''single'Selection mode
minDateDateEarliest selectable date
maxDateDateLatest selectable date
placeholderstringInput placeholder
ComponentWhen to Use Instead
CalendarInline calendar without input
TextFieldPlain text input

On this page