- Docs
- Components
- Dates
Date picker
A date field: typed in the locale's order (25/10/2026 for India), or chosen from a calendar.
- Import
- @qeetrix/react/experimental
- Status
- ExperimentalSince 0.0.6
- Renders
<input> + calendarServer-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Import
// Experimental: from the package's experimental entry, until it's stable.
import { DatePicker } from "@qeetrix/react/experimental";02
Props
And every native attribute of the element it renders.
| Prop | Type | Default | What it does |
|---|---|---|---|
value · defaultValue | string | null | null | The date, "YYYY-MM-DD". |
onValueChange | (value: string | null) => void | — | The new date; null when cleared or what's typed isn't a date. |
min · max | string | — | The earliest and latest dates, "YYYY-MM-DD". |
isDateDisabled | (date: string) => boolean | — | Rules out more dates. |
locale | string | the provider's | The date's order, the language and the week. |
today | string | the browser's | Today, for tests and screenshots. |
name | string | — | A hidden input submits "YYYY-MM-DD". |
messages | Partial<…datePicker> | — | Its words, over QeetrixProvider's. |
… Input's props | | — | disabled, readOnly, placeholder and the rest, but type. |
03
Parts
Each part carries a data-slot, for tests and placement.
| data-slot | Element | What it is |
|---|---|---|
input-control | <input> | The text: Input's parts throughout. |
icon-button | <button> | The calendar button, named after the field. |
date-picker-panel | <div> | The popover with the calendar: the WAI-ARIA date picker dialog. |
04
Submitted as YYYY-MM-DD
name submits a hidden "YYYY-MM-DD"; a Form's onFormSubmit values read the field's text instead, so read the date from state.
const [joinedOn, setJoinedOn] = useState<string | null>(null);
<Field label="Joining date">
<DatePicker name="joinedOn" value={joinedOn} onValueChange={setJoinedOn} />
</Field>