<DatePicker aria-label="Meeting date" defaultValue={parseDate("2020-02-03")}>
<InputGroup>
<DateInput />
<InputGroupAddon>
<Button variant="default" size="sm" isIconOnly>
<CalendarIcon />
</Button>
</InputGroupAddon>
</InputGroup>
<Popover>
<DialogContent>
<Calendar />
</DialogContent>
</Popover>
</DatePicker>npx shadcn@latest add @dotui/date-pickerUse date pickers to allow users to select a date using a field and a calendar popover.
import { CalendarIcon } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Calendar } from "@/components/ui/calendar";
import { DatePicker } from "@/components/ui/date-picker";
import { DialogContent } from "@/components/ui/dialog";
import { Label } from "@/components/ui/field";
import { DateInput, InputAddon, InputGroup } from "@/components/ui/input";
import { Overlay } from "@/components/ui/overlay";<DatePicker>
<Label>Date</Label>
<InputGroup>
<DateInput />
<InputAddon>
<Button variant="default" size="sm" isIconOnly>
<CalendarIcon />
</Button>
</InputAddon>
</InputGroup>
<Overlay type="popover" mobileType="drawer">
<DialogContent>
<Calendar />
</DialogContent>
</Overlay>
</DatePicker>selected date: 2020-02-03
A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.
| Prop | Type | Default | |
|---|---|---|---|
ReactNode | function | — | ||
union | — | ||
Granularity | — | ||
boolean | false | ||
12 | 24 | — | ||
((date: DateValue) => boolean) | — | ||
boolean | — | ||
boolean | — | ||
PageBehavior | visible | ||
T | null | — | ||
DOMRenderFunction<"div", DatePickerRenderProps> | — | ||
boolean | — | ||
T | null | — | ||
T | null | — | ||
function | — | ||
A date range picker combines two DateFields and a RangeCalendar popover to allow users to enter or select a date and time range.
| Prop | Type | Default | |
|---|---|---|---|
boolean | — | ||
ReactNode | function | — | ||
union | — | ||
Granularity | — | ||
boolean | false | ||
12 | 24 | — | ||
union | — | ||
boolean | — | ||
boolean | — | ||
PageBehavior | visible | ||
T | null | — | ||
DOMRenderFunction<"div", DateRangePickerRenderProps> | — | ||
boolean | — | ||
RangeValue<T> | null | — | ||
RangeValue<T> | null | — | ||
function | — | ||
Last updated on 6/4/2026