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

PropTypeDefaultDescription
valueDate | null—Controlled selected date.
defaultValueDate | string | number | null—Initial uncontrolled date.
onValueChange(value: Date | null) => void—Selection change handler.
placeholderstring'Pick a date'Shown when no date is selected.
formatLabel(date: Date) => string—Custom formatter. Default: locale date string.
calendarPropsCalendarProps (subset)—Forwarded to the underlying Calendar (min/max, isDateDisabled, etc.).