Overview
Forms & inputs
Search for a command to run or a page to navigate to.
A date selection component that combines an input field or button with a calendar popup.
import { DatePicker } from "@strongtie/design-system/date-picker"Not installed yet? Add the package to your app:
This module exports the following components:
DatePickerDatePickerTriggerDatePickerContentDatePickerInputDatePickerButtonDatePickerCalendar<DatePickerInput>| Prop | Type | Default | Description |
|---|---|---|---|
onCalendarClick | (() => void) | - | Callback fired when the calendar icon button is clicked. |
onOpenPopover | (() => void) | - | Callback fired when the popover should open (on focus or input change). |
<DatePickerButton>| Prop | Type | Default | Description |
|---|---|---|---|
formatDate | ((date: Date) => string) | - | Custom function to format the date for display. If not provided, uses the default toLocaleDateString() format. |
open | boolean | - | Whether the date picker is currently open. |
placeholder | string | Select date | Placeholder text displayed when no date is selected. |
size | "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | - | |
variant | "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | - |
<DatePickerCalendar>| Prop | Type | Default | Description |
|---|---|---|---|
buttonVariant | "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | - |