Home / File/ calendar-23.tsx — ui Source File

calendar-23.tsx — ui Source File

Architecture documentation for calendar-23.tsx, a tsx file in the ui codebase. 7 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 7 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  c667a641_fe2e_e3cd_5db0_76b4c10ac0aa["calendar-23.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  c667a641_fe2e_e3cd_5db0_76b4c10ac0aa --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  c667a641_fe2e_e3cd_5db0_76b4c10ac0aa --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  bfc8708c_7488_3983_8998_32b793781735["react-day-picker"]
  c667a641_fe2e_e3cd_5db0_76b4c10ac0aa --> bfc8708c_7488_3983_8998_32b793781735
  d418ad18_b947_f4e5_6e4c_01100d7a63e4["button"]
  c667a641_fe2e_e3cd_5db0_76b4c10ac0aa --> d418ad18_b947_f4e5_6e4c_01100d7a63e4
  9296b496_7dcb_ebca_2184_14782807983b["calendar"]
  c667a641_fe2e_e3cd_5db0_76b4c10ac0aa --> 9296b496_7dcb_ebca_2184_14782807983b
  f826d306_7d63_5ba3_6a53_387904d37a9f["label"]
  c667a641_fe2e_e3cd_5db0_76b4c10ac0aa --> f826d306_7d63_5ba3_6a53_387904d37a9f
  d1761ea6_65b9_f5fd_76e0_66663b00b300["popover"]
  c667a641_fe2e_e3cd_5db0_76b4c10ac0aa --> d1761ea6_65b9_f5fd_76e0_66663b00b300
  style c667a641_fe2e_e3cd_5db0_76b4c10ac0aa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { ChevronDownIcon } from "lucide-react"
import { type DateRange } from "react-day-picker"

import { Button } from "@/registry/default/ui/button"
import { Calendar } from "@/registry/default/ui/calendar"
import { Label } from "@/registry/default/ui/label"
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@/registry/default/ui/popover"

export default function Calendar23() {
  const [range, setRange] = React.useState<DateRange | undefined>(undefined)

  return (
    <div className="flex flex-col gap-3">
      <Label htmlFor="dates" className="px-1">
        Select your stay
      </Label>
      <Popover>
        <PopoverTrigger asChild>
          <Button
            variant="outline"
            id="dates"
            className="w-56 justify-between font-normal"
          >
            {range?.from && range?.to
              ? `${range.from.toLocaleDateString()} - ${range.to.toLocaleDateString()}`
              : "Select date"}
            <ChevronDownIcon />
          </Button>
        </PopoverTrigger>
        <PopoverContent className="w-auto overflow-hidden p-0" align="start">
          <Calendar
            mode="range"
            selected={range}
            captionLayout="dropdown"
            onSelect={(range) => {
              setRange(range)
            }}
          />
        </PopoverContent>
      </Popover>
    </div>
  )
}

Subdomains

Functions

Dependencies

  • button
  • calendar
  • label
  • lucide-react
  • popover
  • react
  • react-day-picker

Frequently Asked Questions

What does calendar-23.tsx do?
calendar-23.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in calendar-23.tsx?
calendar-23.tsx defines 1 function(s): Calendar23.
What does calendar-23.tsx depend on?
calendar-23.tsx imports 7 module(s): button, calendar, label, lucide-react, popover, react, react-day-picker.
Where is calendar-23.tsx in the architecture?
calendar-23.tsx is located at deprecated/www/registry/default/blocks/calendar-23.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/default/blocks).

Analyze Your Own Codebase

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

Try Supermodel Free