DatePicker
Calendar in a Popover, anchored to an input-style trigger. Selection closes the popover.
Usage
import { DatePicker } from '@bwo-ui/react';
const [date, setDate] = useState<Date | null>(null);
<DatePicker value={date} onValueChange={setDate} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | Date | null | — | Controlled selected date. |
defaultValue | Date | string | number | null | — | Initial uncontrolled date. |
onValueChange | (value: Date | null) => void | — | Selection change handler. |
placeholder | string | 'Pick a date' | Shown when no date is selected. |
formatLabel | (date: Date) => string | — | Custom formatter. Default: locale date string. |
calendarProps | CalendarProps (subset) | — | Forwarded to the underlying Calendar (min/max, isDateDisabled, etc.). |