{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "calendar-12", "type": "registry:block", "author": "shadcn (https://ui.shadcn.com)", "description": "Localized calendar", "registryDependencies": [ "calendar", "card", "select" ], "files": [ { "path": "blocks/calendar-12.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { type DateRange } from \"react-day-picker\"\nimport { enUS, es } from \"react-day-picker/locale\"\n\nimport { Calendar } from \"@/registry/new-york/ui/calendar\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/registry/new-york/ui/card\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/new-york/ui/select\"\n\nconst localizedStrings = {\n en: {\n title: \"Book an appointment\",\n description: \"Select the dates for your appointment\",\n },\n es: {\n title: \"Reserva una cita\",\n description: \"Selecciona las fechas para tu cita\",\n },\n} as const\n\nexport default function Calendar12() {\n const [locale, setLocale] =\n React.useState(\"es\")\n const [dateRange, setDateRange] = React.useState({\n from: new Date(2025, 8, 9),\n to: new Date(2025, 8, 17),\n })\n\n return (\n \n \n {localizedStrings[locale].title}\n \n {localizedStrings[locale].description}\n \n \n setLocale(value as keyof typeof localizedStrings)\n }\n >\n \n \n \n \n EspaƱol\n English\n \n \n \n \n \n \n \n )\n}\n", "type": "registry:component", "target": "" } ], "meta": { "iframeHeight": "600px", "container": "w-full bg-surface min-h-svh flex px-6 py-12 items-start md:pt-20 justify-center min-w-0 xl:py-24", "mobile": "component" }, "categories": [ "calendar", "date" ] }