Skip to content

Date picker

Standalone themeable date and time picker with portal popup calendar, editable text draft input, and customizable token styling.

// Radix — @radix-ui/react-popover
import { DatePicker } from "@shavin/ui";

Date and time

Component Source
<DatePicker value={date} onChange={setDate} />

Date only

Component Source
<DatePicker value={date} onChange={setDate} dateOnly />

Props

PropTypeDefaultDescription
value*Date—Active selected Date object.
onChange*(d: Date) => void—Callback fired when Date changes.
dateOnlybooleanfalseHide time selection controls and close on day pick. Default false.
tokensPartial<DatePickerTokens>—Override any visual token; unspecified keys fall back to the theme.
classNamestring—Optional custom CSS class name.
idstring—id of the text field, so a `<label htmlFor>` can name it.
localestring—Locale for the field text and day names. Defaults to the browser's locale.

* required

Configure Theme
Theme
Brand Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font