Skip to main content
  1. Docs
  2. Components
  3. 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

date-picker.tsx
// 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.

PropTypeDefaultWhat it does
value · defaultValuestring | nullnullThe date, "YYYY-MM-DD".
onValueChange(value: string | null) => void—The new date; null when cleared or what's typed isn't a date.
min · maxstring—The earliest and latest dates, "YYYY-MM-DD".
isDateDisabled(date: string) => boolean—Rules out more dates.
localestringthe provider'sThe date's order, the language and the week.
todaystringthe browser'sToday, for tests and screenshots.
namestring—A hidden input submits "YYYY-MM-DD".
messagesPartial<…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-slotElementWhat 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.

joining.tsx
const [joinedOn, setJoinedOn] = useState<string | null>(null);

<Field label="Joining date">
  <DatePicker name="joinedOn" value={joinedOn} onValueChange={setJoinedOn} />
</Field>
Next — Date pickerAccessibility