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

calendar-30.tsx — ui Source File

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

File tsx ComponentRegistry ChartRegistry 8 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  c7b51e7d_53c1_1a8e_62b8_06968b10a1af["calendar-30.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  c7b51e7d_53c1_1a8e_62b8_06968b10a1af --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  31620d04_0563_6542_783f_2d872fad830e["little-date"]
  c7b51e7d_53c1_1a8e_62b8_06968b10a1af --> 31620d04_0563_6542_783f_2d872fad830e
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  c7b51e7d_53c1_1a8e_62b8_06968b10a1af --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  bfc8708c_7488_3983_8998_32b793781735["react-day-picker"]
  c7b51e7d_53c1_1a8e_62b8_06968b10a1af --> bfc8708c_7488_3983_8998_32b793781735
  aa2f3ec6_f291_3763_88ec_65a3f5ad5939["button"]
  c7b51e7d_53c1_1a8e_62b8_06968b10a1af --> aa2f3ec6_f291_3763_88ec_65a3f5ad5939
  5000e233_363d_e409_8b5c_7e80d38646fe["calendar"]
  c7b51e7d_53c1_1a8e_62b8_06968b10a1af --> 5000e233_363d_e409_8b5c_7e80d38646fe
  fa665cdb_5f79_b81a_95ab_12ba182fc175["label"]
  c7b51e7d_53c1_1a8e_62b8_06968b10a1af --> fa665cdb_5f79_b81a_95ab_12ba182fc175
  e33b0d79_0534_28ec_a112_ac16ee736e09["popover"]
  c7b51e7d_53c1_1a8e_62b8_06968b10a1af --> e33b0d79_0534_28ec_a112_ac16ee736e09
  style c7b51e7d_53c1_1a8e_62b8_06968b10a1af fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

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

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

export default function Calendar30() {
  const [range, setRange] = React.useState<DateRange | undefined>({
    from: new Date(2025, 5, 4),
    to: new Date(2025, 5, 10),
  })

  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
              ? formatDateRange(range.from, range.to, {
                  includeTime: false,
                })
              : "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
  • little-date
  • lucide-react
  • popover
  • react
  • react-day-picker

Frequently Asked Questions

What does calendar-30.tsx do?
calendar-30.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-30.tsx?
calendar-30.tsx defines 1 function(s): Calendar30.
What does calendar-30.tsx depend on?
calendar-30.tsx imports 8 module(s): button, calendar, label, little-date, lucide-react, popover, react, react-day-picker.
Where is calendar-30.tsx in the architecture?
calendar-30.tsx is located at deprecated/www/__registry__/new-york/blocks/calendar-30.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/__registry__/new-york/blocks).

Analyze Your Own Codebase

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

Try Supermodel Free