Files
co-lite/solvway-admin-portal/app/components/ui/calendar.tsx
T
ngqileandClaude Opus 5.5 c908fbe9fc feat(admin-portal): port babyboo's date picker and calendar
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
2026-11-27 00:23:56 +08:00

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 }