Adds react-day-picker 10.0.1 (it brings date-fns). The portal bans native date inputs, and the events and leads forms need a date field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
22 lines
574 B
TypeScript
22 lines
574 B
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import { DayPicker } from "react-day-picker"
|
|
import "react-day-picker/style.css"
|
|
|
|
import { cn } from "@/app/lib/utils"
|
|
|
|
/** shadcn-style Calendar on react-day-picker v10, themed by `.admin-calendar` in globals.css. */
|
|
function Calendar({ className, captionLayout = "dropdown", ...props }: React.ComponentProps<typeof DayPicker>) {
|
|
return (
|
|
<DayPicker
|
|
data-slot="calendar"
|
|
captionLayout={captionLayout}
|
|
className={cn("admin-calendar text-sm", className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export { Calendar }
|