A shadcn-style date picker component built with Ark UI primitives.

Installation

npx shadcn@latest add @ark-cn/date-picker

Usage

import * as DatePicker from "@/components/ui/date-picker"

Read exported parts in src/components/ui/date-picker.tsx and compose the primitive according to the Ark UI pattern for this component.

Examples

Single

Multiple

Select a date

Range

Range Multiple Months

Preset

Month Year Picker

Calendar

26
27
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6

Unavailable Dates

Min Max Dates

Max Selection

Select a date

Month Picker

Year Picker

API reference

This component mirrors the upstream Ark UI primitive. All props and DOM behavior are defined by Ark unless you see an ark-cn-only row below.

DatePickerInput

PropTypeDescription
size?"default" | "sm" | "lg"Input size tier.
variant?"button" | "input"Button-style trigger vs input-group field.
startAddon?ReactNodeSlot before the field.
endAddon?ReactNodeSlot after the field.
showClear?booleanToggles the clear control.
containerClassName?stringWrapper class for the control.
placeholder?stringPlaceholder text.
separator?stringSeparator for range display in button variant.

DatePickerViewTrigger

PropTypeDescription
viewTriggerTextOnly?booleanReplaces trigger with centered DatePickerRangeText.
monthYearSelect?booleanOn day view, replaces title with month/year Select controls.

DatePickerCalendar

PropTypeDescription
enablePresets?booleanShows preset quick-range buttons.
viewTriggerTextOnly?booleanForwarded to calendar view headers.
monthYearSelect?booleanForwarded to calendar view headers.
monthColumns?numberGrid column count for month view.
yearColumns?numberGrid column count for year view.

See the ARK UI documentation for the full API.