{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "calendar-32", "type": "registry:block", "author": "shadcn (https://ui.shadcn.com)", "description": "Date picker in a drawer", "registryDependencies": [ "calendar", "button", "drawer" ], "files": [ { "path": "blocks/calendar-32.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { CalendarPlusIcon } from \"lucide-react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport { Calendar } from \"@/registry/default/ui/calendar\"\nimport {\n Drawer,\n DrawerContent,\n DrawerDescription,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n} from \"@/registry/default/ui/drawer\"\nimport { Label } from \"@/registry/default/ui/label\"\n\nexport default function Calendar32() {\n const [open, setOpen] = React.useState(false)\n const [date, setDate] = React.useState(undefined)\n\n return (\n
\n \n \n \n \n {date ? date.toLocaleDateString() : \"Select date\"}\n \n \n \n \n \n Select date\n Set your date of birth\n \n {\n setDate(date)\n setOpen(false)\n }}\n className=\"mx-auto [--cell-size:clamp(0px,calc(100vw/7.5),52px)]\"\n />\n \n \n
\n This example works best on mobile.\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" ] }