Skip to content
aq-ui
Back to ComponentsComponent

Date Picker

Open-code aq-ui accessible component family for Date Picker.

Preview

This is a live example. Interact with the available controls and use the keyboard to inspect the component's states and behavior.

Loading interactive preview…

Installation

pnpm dlx aq-ui@alpha add date-picker

API reference

Client module

Import the parts you need, then jump to an export for its contract.

View full source

Quick start

"use client"

import { DatePicker } from "@/components/ui/date-picker"

<DatePicker />

DatePicker

constSource L34

Open-code aq-ui accessible component family for Date Picker.

const DatePicker = React.forwardRef<HTMLDivElement, DatePickerProps>(…)
Props type
DatePickerProps
<DatePicker />

DatePickerProps

interfaceSource L16

Type contract for DatePickerProps.

interface DatePickerProps extends Omit< React.ComponentPropsWithoutRef<"div">, "children" | "defaultValue" | "onChange" >

Members

NameTypeDefault
value?Date—
defaultValue?Date—
onValueChange?(date: Date | undefined) => void—
placeholder?string"Pick a date"
disabled?boolean—
fromDate?Date—
toDate?Date—
locale?React.ComponentProps<typeof Calendar>["locale"]—
formatDate?(date: Date) => string(date) => format(date, "PPP")
className?string—
calendarClassName?string—
name?string—

Registry dependencies

button, calendar, popover, utils

Package dependencies

date-fns@^4.4.0, lucide-react@^1.31.0

Files

  • components/ui/date-picker.tsx

Source