DatePicker
A trigger button that opens a calendar popup for selecting a single date, with full keyboard navigation, min/max bounds, and no external date library.
Installation
npx dafink-ui add date-pickerDemo
Arrow keys navigate the calendar grid.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| value | Date | null | undefined | The currently selected date (controlled). |
| onChange | (date: Date) => void | undefined | Called when the user selects a day. |
| placeholder | string | 'Pick a date' | Text shown when no date is selected. |
| min | Date | undefined | Earliest selectable date. |
| max | Date | undefined | Latest selectable date. |
| disabled | boolean | false | Disables the trigger. |
| label | string | undefined | Visible label above the trigger. |
| hint | string | undefined | Helper text below the trigger. |
| error | string | undefined | Error message; applies error border styling. |
| className | string | '' | Additional classes on the root wrapper. |