DatePicker

Pairs a Calendar inside a Popover with a button that reads back the chosen date. Use it wherever a date needs picking rather than typing.

React

Ready

Figma

Import

import { DatePicker } from "@kela-systems/ui-components";

This page has no live example yet. Storybook shows DatePicker in every state and theme.

Props

DatePicker

NameDefaultDescription
variant
"default" | "secondary" | "destructive" | "outline" | "ghost" | "link"
"default"
size
"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg"
"default"
captionLayout
"label" | "dropdown" | "dropdown-months" | "dropdown-years"
"label"
loading
boolean
Shows a spinner and prevents interaction while keeping the variant's resting colors.
value
Date
defaultValue
Date
onValueChange
(date: Date | undefined) => void
placeholder
string
Select date
locale
React.ComponentProps<typeof Calendar>["locale"]
formatValue
(date: Date | undefined) => string | undefined
(date) => formatDate(date, locale?.code)Renders the trigger's label. Defaults to a long date in locale, or the user's locale without one.

It also takes the props of Base UI's button.

Read this page as Markdown

Search ARK

Find a page, a primitive or a component.