Command Palette

Search for a command to run...

Date Picker

shadcn/ui

A date picker component built with Calendar and Popover.

import { DatePicker } from "@/registry/optics/date-picker";import { useState } from "react";const [date, setDate] = useState();<DatePicker	date={date}	onDateChange={setDate}	placeholder="Pick a date"/>

Installation

pnpm dlx shadcn@latest add https://optics.agusmayol.com.ar/r/date-picker.json

Props

<DatePicker />
Name
Type
className
string
date
Date | undefined
onDateChange
(date: Date | undefined) => void
placeholder
string (default: "Pick a date")
variant
string (default: "outline")