"use client";
import { DatePicker } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Current value (controlled); null where it means "nothing selected". |
calendarButtonLabel | string | datePicker.openCalendar | Label of the calendar toggle (default: datePicker.openCalendar message). |
calendarLabel | string | datePicker.calendarLabel | Accessible name of the calendar popup (default: datePicker.calendarLabel message). |
defaultOpen | boolean | — | Initial open state when uncontrolled. |
defaultValue | string | — | Initial value when uncontrolled. |
inputLabel | string | datePicker.label | Accessible name of the date input (default: datePicker.label message). |
locale | string | LocaleProvider locale | BCP 47 locale for the calendar (default: LocaleProvider locale). |
onOpenChange | (open: boolean) => void | — | Called with the next open state. |
onValueChange | (value: string) => void | — | Called with the new value (only when it changes). |
open | boolean | — | Open state (controlled). |
placeholder | string | — | — |
weekStartsOn | WeekStart | from the locale | First day of the week in the calendar (default: from the locale). |
valuestring
Current value (controlled); null where it means "nothing selected".
calendarButtonLabeldefault datePicker.openCalendarstring
Label of the calendar toggle (default: datePicker.openCalendar message).
calendarLabeldefault datePicker.calendarLabelstring
Accessible name of the calendar popup (default: datePicker.calendarLabel message).
defaultOpenboolean
Initial open state when uncontrolled.
defaultValuestring
Initial value when uncontrolled.
inputLabeldefault datePicker.labelstring
Accessible name of the date input (default: datePicker.label message).
localedefault LocaleProvider localestring
BCP 47 locale for the calendar (default: LocaleProvider locale).
onOpenChange(open: boolean) => void
Called with the next open state.
onValueChange(value: string) => void
Called with the new value (only when it changes).
openboolean
Open state (controlled).
placeholderstring
weekStartsOndefault from the localeWeekStart
First day of the week in the calendar (default: from the locale).
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
const date = "2026-07-14";
<DatePicker value={date} />