DatePicker
inputsA date picker input that combines a button trigger with a calendar popover.
Preview
Installation
npm install @launchapp/design-systemImport
import { DatePicker } from "@launchapp/design-system";Examples
Date Picker
const [date, setDate] = React.useState<Date | undefined>();<DatePicker selected={date} onSelect={setDate} placeholder="Pick a date"/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
selected | Date | undefined | — | Controlled selected date. |
onSelect | (date: Date | undefined) => void | — | Callback when date is selected. |
placeholder | string | "Pick a date" | Placeholder text when no date is selected. |
disabled | boolean | false | Disables the picker. |
dateFormat | string | "PPP" | date-fns format string for the displayed date. |
className | string | — | Additional CSS classes. |