Forms
Date Picker
A field that opens a Calendar and shows the chosen date in short form.
Group: Forms. Exports: DatePicker. shadcn/ui equivalent: Date Picker (partial parity).
Usage
import { DatePicker } from "./halaska-kit";
DatePicker props
valueany: The controlled value.onChange(value) => void: Called with the new value.labelstring: Visible label.placeholderstring(default "Pick a date"): Hint shown while empty.
Accessibility
- The trigger is a native button with aria-expanded. A string label is added to its accessible name along with the chosen date.
- Escape closes the calendar and returns focus to the trigger. A pick or an outside click also closes it.
- Focus stays on the trigger when the calendar opens. Tab moves into the days.
- After a date is picked, focus is not returned to the trigger.
Known gaps
- No date range, and no presets.
- No typed date entry.
- No disabled state, and no minimum or maximum date.
Halaska UI · Components · Patterns · Screens · Install