Home / Function/ Calendar24() — ui Function Reference

Calendar24() — ui Function Reference

Architecture documentation for the Calendar24() function in calendar-24.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  fa233ea9_646e_8920_0091_54e4a1114b4f["Calendar24()"]
  dd89a4ba_636f_5736_b72b_331913298227["calendar-24.tsx"]
  fa233ea9_646e_8920_0091_54e4a1114b4f -->|defined in| dd89a4ba_636f_5736_b72b_331913298227
  style fa233ea9_646e_8920_0091_54e4a1114b4f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/default/blocks/calendar-24.tsx lines 16–64

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

  return (
    <div className="flex gap-4">
      <div className="flex flex-col gap-3">
        <Label htmlFor="date" className="px-1">
          Date
        </Label>
        <Popover open={open} onOpenChange={setOpen}>
          <PopoverTrigger asChild>
            <Button
              variant="outline"
              id="date"
              className="w-32 justify-between font-normal"
            >
              {date ? date.toLocaleDateString() : "Select date"}
              <ChevronDownIcon />
            </Button>
          </PopoverTrigger>
          <PopoverContent className="w-auto overflow-hidden p-0" align="start">
            <Calendar
              mode="single"
              selected={date}
              captionLayout="dropdown"
              onSelect={(date) => {
                setDate(date)
                setOpen(false)
              }}
            />
          </PopoverContent>
        </Popover>
      </div>
      <div className="flex flex-col gap-3">
        <Label htmlFor="time" className="px-1">
          Time
        </Label>
        <Input
          type="time"
          id="time"
          step="1"
          defaultValue="10:30:00"
          className="bg-background appearance-none [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none"
        />
      </div>
    </div>
  )
}

Subdomains

Frequently Asked Questions

What does Calendar24() do?
Calendar24() is a function in the ui codebase, defined in deprecated/www/registry/default/blocks/calendar-24.tsx.
Where is Calendar24() defined?
Calendar24() is defined in deprecated/www/registry/default/blocks/calendar-24.tsx at line 16.

Analyze Your Own Codebase

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

Try Supermodel Free