Home / File/ date-picker-demo.tsx — ui Source File

date-picker-demo.tsx — ui Source File

Architecture documentation for date-picker-demo.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
  c75ffdf4_ea62_b7e6_d5ed_a7fac2cf9aa8["date-picker-demo.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  c75ffdf4_ea62_b7e6_d5ed_a7fac2cf9aa8 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  f9e8c1ea_9de4_3e04_ca27_b15cada2e81e["date-fns"]
  c75ffdf4_ea62_b7e6_d5ed_a7fac2cf9aa8 --> f9e8c1ea_9de4_3e04_ca27_b15cada2e81e
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  c75ffdf4_ea62_b7e6_d5ed_a7fac2cf9aa8 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  c75ffdf4_ea62_b7e6_d5ed_a7fac2cf9aa8 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  aa2f3ec6_f291_3763_88ec_65a3f5ad5939["button"]
  c75ffdf4_ea62_b7e6_d5ed_a7fac2cf9aa8 --> aa2f3ec6_f291_3763_88ec_65a3f5ad5939
  5000e233_363d_e409_8b5c_7e80d38646fe["calendar"]
  c75ffdf4_ea62_b7e6_d5ed_a7fac2cf9aa8 --> 5000e233_363d_e409_8b5c_7e80d38646fe
  e33b0d79_0534_28ec_a112_ac16ee736e09["popover"]
  c75ffdf4_ea62_b7e6_d5ed_a7fac2cf9aa8 --> e33b0d79_0534_28ec_a112_ac16ee736e09
  style c75ffdf4_ea62_b7e6_d5ed_a7fac2cf9aa8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { format } from "date-fns"
import { CalendarIcon } from "lucide-react"

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

export default function DatePickerDemo() {
  const [date, setDate] = React.useState<Date>()

  return (
    <Popover>
      <PopoverTrigger asChild>
        <Button
          variant={"outline"}
          className={cn(
            "w-[240px] justify-start text-left font-normal",
            !date && "text-muted-foreground"
          )}
        >
          <CalendarIcon />
          {date ? format(date, "PPP") : <span>Pick a date</span>}
        </Button>
      </PopoverTrigger>
      <PopoverContent className="w-auto p-0" align="start">
        <Calendar
          mode="single"
          selected={date}
          onSelect={setDate}
          initialFocus
        />
      </PopoverContent>
    </Popover>
  )
}

Subdomains

Functions

Dependencies

  • button
  • calendar
  • date-fns
  • lucide-react
  • popover
  • react
  • utils

Frequently Asked Questions

What does date-picker-demo.tsx do?
date-picker-demo.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 date-picker-demo.tsx?
date-picker-demo.tsx defines 1 function(s): DatePickerDemo.
What does date-picker-demo.tsx depend on?
date-picker-demo.tsx imports 7 module(s): button, calendar, date-fns, lucide-react, popover, react, utils.
Where is date-picker-demo.tsx in the architecture?
date-picker-demo.tsx is located at deprecated/www/registry/new-york/examples/date-picker-demo.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/examples).

Analyze Your Own Codebase

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

Try Supermodel Free