{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "calendar-31", "type": "registry:block", "author": "shadcn (https://ui.shadcn.com)", "description": "With event slots", "registryDependencies": [ "calendar", "card", "button" ], "files": [ { "path": "blocks/calendar-31.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { formatDateRange } from \"little-date\"\nimport { PlusIcon } from \"lucide-react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport { Calendar } from \"@/registry/default/ui/calendar\"\nimport { Card, CardContent, CardFooter } from \"@/registry/default/ui/card\"\n\nconst events = [\n {\n title: \"Team Sync Meeting\",\n from: \"2025-06-12T09:00:00\",\n to: \"2025-06-12T10:00:00\",\n },\n {\n title: \"Design Review\",\n from: \"2025-06-12T11:30:00\",\n to: \"2025-06-12T12:30:00\",\n },\n {\n title: \"Client Presentation\",\n from: \"2025-06-12T14:00:00\",\n to: \"2025-06-12T15:00:00\",\n },\n]\n\nexport default function Calendar31() {\n const [date, setDate] = React.useState(\n new Date(2025, 5, 12)\n )\n\n return (\n \n \n \n \n \n
\n
\n {date?.toLocaleDateString(\"en-US\", {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n })}\n
\n \n \n Add Event\n \n
\n
\n {events.map((event) => (\n \n
{event.title}
\n
\n {formatDateRange(new Date(event.from), new Date(event.to))}\n
\n
\n ))}\n \n
\n
\n )\n}\n", "type": "registry:component", "target": "" } ], "meta": { "iframeHeight": "700px", "container": "w-full bg-surface min-h-svh flex px-6 py-12 items-start md:pt-20 justify-center min-w-0", "mobile": "component" }, "categories": [ "calendar", "date" ] }