Date & time
DatePicker
A text input plus calendar popover for a single date, with locale-aware typed-input parsing.
DatePickerPreview
Usage
tsx
import { DatePicker } from "@vesture/react";
<DatePicker value={date} onChange={setDate} minDate={new Date()} locale="en-GB" />Behavior
- Typed text is parsed locale-aware and rejects overflow dates (e.g. Feb 31); invalid text reverts to the last valid value on blur.
- Popover uses a non-modal dialog role and returns focus to the input on close.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value / defaultValue / onChange | Date | null | — | onChange receives null when cleared. |
| minDate / maxDate / isDateDisabled | mixed | — | Same as Calendar. |
| locale | string | "en-US" | Drives input parsing, placeholder, and the Calendar. |
| placeholder | string | — | Defaults to a locale-derived format like MM/DD/YYYY. |
| open / onOpenChange | boolean / fn | — | Controlled popover state. |