Home / Function/ Calendar25() — ui Function Reference

Calendar25() — ui Function Reference

Architecture documentation for the Calendar25() function in calendar-25.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  3b8cf340_e32e_333b_de5d_d1bbe5c017ee["Calendar25()"]
  cf1c0c39_db1c_aef5_8806_53499b888a39["calendar-25.tsx"]
  3b8cf340_e32e_333b_de5d_d1bbe5c017ee -->|defined in| cf1c0c39_db1c_aef5_8806_53499b888a39
  style 3b8cf340_e32e_333b_de5d_d1bbe5c017ee fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/blocks/calendar-25.tsx lines 16–78

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

  return (
    <div className="flex flex-col gap-6">
      <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-full 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 gap-4">
        <div className="flex flex-col gap-3">
          <Label htmlFor="time-from" className="px-1">
            From
          </Label>
          <Input
            type="time"
            id="time-from"
            step="1"
            defaultValue="10:30:00"
            className="bg-background appearance-none [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none"
          />
        </div>
        <div className="flex flex-col gap-3">
          <Label htmlFor="time-to" className="px-1">
            To
          </Label>
          <Input
            type="time"
            id="time-to"
            step="1"
            defaultValue="12:30:00"
            className="bg-background appearance-none [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none"
          />
        </div>
      </div>
    </div>
  )
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free