Date Picker
Standalone themeable date and time picker with portal popup calendar, editable text draft input, and customizable token styling.
// Plain markup
import { DatePicker } from "@shavin/ui";DatePicker — date & time
Component Source
<DatePicker value={date} onChange={setDate} />DatePicker — date only
Component Source
<DatePicker value={date} onChange={setDate} dateOnly />Props Specification
| Prop | Type | Default | Description |
|---|---|---|---|
| value* | Date | — | Active selected Date object. |
| onChange* | (d: Date) => void | — | Callback fired when Date changes. |
| dateOnly | boolean | false | Hide time selection controls and close on day pick. Default false. |
| tokens | Partial<DatePickerTokens> | — | Override any visual token; unspecified keys fall back to the theme. |
| className | string | — | Optional custom CSS class name. |
* required