Date Picker

A field that opens a calendar in a popover, or a bottom sheet on phones.
Stable
Web
iOS
Android
@advui/core
Source

Basic

We remind you a day before.

Installation

pnpm
pnpm add @advui/core
npm
npm install @advui/core

Usage

import { DatePicker, Field } from '@advui/core'

<Field label="Due date">
  <DatePicker value={due} onValueChange={setDue} min={new Date()} />
</Field>

API reference

DatePicker

Also takes Calendar’s `min`, `max`, `isDateDisabled`, `weekStartsOn` and `locale`.
PropTypeDefaultDescription
valueDate | null—The picked day.
defaultValueDate | null—Starting `value` when uncontrolled.
onValueChange(value: Date | null) => void—Called when a day is picked; the panel then closes.
openboolean—Open state of the panel.
defaultOpenboolean—Starting `open` when uncontrolled.
onOpenChange(open: boolean) => void—Called with the new `open`.
placeholderstring'Pick a date'Shown while empty.
formatOptionsIntl.DateTimeFormatOptions{ dateStyle: 'medium' }How the day is written in the field.
titlestring'Choose a date'Title of the panel, which names it for screen readers.
size'sm' | 'md' | 'lg''md'As Input.
invalidbooleanfalseError styling and `aria-invalid`.
disabledbooleanfalseNot focusable or editable.

Accessibility

  • The field is a button with aria-haspopup="dialog"; a Field’s label names it, and the picked date is linked as its description.
  • The panel is a dialog named by its title. Focus moves into it and returns to the field when it closes.
  • The calendar inside follows the WAI-ARIA grid pattern (see Calendar).
Keyboard interactions
KeyAction
Enter / SpaceOpens the calendar (on the field).
EscapeCloses it without changing the date.

Platform notes

iOS
Opens as a bottom sheet.
Android
Opens as a bottom sheet; the back button closes it.
Since v0.5.0Last updated Nov 2, 2026Edit this page on GitHub