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
  cb4f0349_6b07_3583_e0a7_37ae0cb0ad17["date-picker-demo.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  cb4f0349_6b07_3583_e0a7_37ae0cb0ad17 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  f9e8c1ea_9de4_3e04_ca27_b15cada2e81e["date-fns"]
  cb4f0349_6b07_3583_e0a7_37ae0cb0ad17 --> f9e8c1ea_9de4_3e04_ca27_b15cada2e81e
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  cb4f0349_6b07_3583_e0a7_37ae0cb0ad17 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  cb4f0349_6b07_3583_e0a7_37ae0cb0ad17 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  57e86e45_ac6e_7278_be08_9092724e8401["button"]
  cb4f0349_6b07_3583_e0a7_37ae0cb0ad17 --> 57e86e45_ac6e_7278_be08_9092724e8401
  7bfe56e6_25f1_1b2f_588d_f14238c3c071["calendar"]
  cb4f0349_6b07_3583_e0a7_37ae0cb0ad17 --> 7bfe56e6_25f1_1b2f_588d_f14238c3c071
  64a3481c_a85b_fe79_409a_cb7f3f4bb871["popover"]
  cb4f0349_6b07_3583_e0a7_37ae0cb0ad17 --> 64a3481c_a85b_fe79_409a_cb7f3f4bb871
  style cb4f0349_6b07_3583_e0a7_37ae0cb0ad17 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-v4/ui/button"
import { Calendar } from "@/registry/new-york-v4/ui/calendar"
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@/registry/new-york-v4/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 apps/v4/registry/new-york-v4/examples/date-picker-demo.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/new-york-v4/examples).

Analyze Your Own Codebase

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

Try Supermodel Free