Beta modeInstall commands on this page use
lovdacn@beta, which installs from the beta registry and may change before the stable release.What’s in betaLoading preview…
Calendar is in beta. This component was recently added and will be stabled soon.
Installation
npx lovdacn@latest add calendar(You can also use the shortened lvcn alias, e.g., npx lvcn@latest add calendar)
Registry dependencies: utils
Usage
import { Calendar } from "@/components/ui/calendar"
import * as React from "react"
export function Example() {
const [date, setDate] = React.useState<Date | undefined>(new Date());
return (
<Calendar value={date} onChange={setDate} />
)
}