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 | nullControlled selected date.
defaultValueDate | string | number | nullInitial uncontrolled date.
onValueChange(value: Date | null) => voidSelection change handler.
placeholderstring'Pick a date'Shown when no date is selected.
formatLabel(date: Date) => stringCustom formatter. Default: locale date string.
calendarPropsCalendarProps (subset)Forwarded to the underlying Calendar (min/max, isDateDisabled, etc.).