Home / Function/ Calendar32() — ui Function Reference

Calendar32() — ui Function Reference

Architecture documentation for the Calendar32() function in calendar-32.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  c9839bf3_9c29_7ae9_e0aa_5faa91945d2a["Calendar32()"]
  74e3b6c4_9a3e_daa9_22a3_31cf60cd09da["calendar-32.tsx"]
  c9839bf3_9c29_7ae9_e0aa_5faa91945d2a -->|defined in| 74e3b6c4_9a3e_daa9_22a3_31cf60cd09da
  style c9839bf3_9c29_7ae9_e0aa_5faa91945d2a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/blocks/calendar-32.tsx lines 18–60

export default function Calendar32() {
  const [open, setOpen] = React.useState(false)
  const [date, setDate] = React.useState<Date | undefined>(undefined)

  return (
    <div className="flex flex-col gap-3">
      <Label htmlFor="date" className="px-1">
        Date of birth
      </Label>
      <Drawer open={open} onOpenChange={setOpen}>
        <DrawerTrigger asChild>
          <Button
            variant="outline"
            id="date"
            className="w-48 justify-between font-normal"
          >
            {date ? date.toLocaleDateString() : "Select date"}
            <CalendarPlusIcon />
          </Button>
        </DrawerTrigger>
        <DrawerContent className="w-auto overflow-hidden p-0">
          <DrawerHeader className="sr-only">
            <DrawerTitle>Select date</DrawerTitle>
            <DrawerDescription>Set your date of birth</DrawerDescription>
          </DrawerHeader>
          <Calendar
            mode="single"
            selected={date}
            captionLayout="dropdown"
            onSelect={(date) => {
              setDate(date)
              setOpen(false)
            }}
            className="mx-auto [--cell-size:clamp(0px,calc(100vw/7.5),52px)]"
          />
        </DrawerContent>
      </Drawer>
      <div className="text-muted-foreground px-1 text-sm">
        This example works best on mobile.
      </div>
    </div>
  )
}

Subdomains

Frequently Asked Questions

What does Calendar32() do?
Calendar32() is a function in the ui codebase, defined in deprecated/www/registry/new-york/blocks/calendar-32.tsx.
Where is Calendar32() defined?
Calendar32() is defined in deprecated/www/registry/new-york/blocks/calendar-32.tsx at line 18.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free