Search...

Search documentation...

Date Picker

Date Picker

A button trigger showing the formatted date, opening a Popover with a Calendar — MUI-style month/year dropdown navigation built in.

import { DatePicker } from "@pompeitech/vesuvius-ui";

Default

With a default value

Disabled

API

DatePicker

PropTypeDefaultDescription
value / defaultValueDateControlled/uncontrolled selected date.
onChange(date: Date | undefined) => void
placeholderstring"Pick a date"Shown on the trigger when nothing's selected.
dateFormatstring"PPP"A date-fns format string, controlling the trigger's displayed text.
disabledbooleanfalse
fromYear / toYearnumberBounds for the year dropdown.

Plus every native prop of the underlying trigger button.

Accessibility

The trigger is a real button announcing the currently selected date (or the placeholder) as its text content — no separate aria-label needed. Once open, the calendar grid follows the same keyboard model as Calendar itself (arrow keys move by day, Enter selects).