Home / Function/ DatePickerDemo() — ui Function Reference

DatePickerDemo() — ui Function Reference

Architecture documentation for the DatePickerDemo() function in date-picker-demo.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  0133a4e0_387a_2430_375d_c30e28b01b2c["DatePickerDemo()"]
  cb4f0349_6b07_3583_e0a7_37ae0cb0ad17["date-picker-demo.tsx"]
  0133a4e0_387a_2430_375d_c30e28b01b2c -->|defined in| cb4f0349_6b07_3583_e0a7_37ae0cb0ad17
  style 0133a4e0_387a_2430_375d_c30e28b01b2c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/new-york-v4/examples/date-picker-demo.tsx lines 16–43

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

Frequently Asked Questions

What does DatePickerDemo() do?
DatePickerDemo() is a function in the ui codebase, defined in apps/v4/registry/new-york-v4/examples/date-picker-demo.tsx.
Where is DatePickerDemo() defined?
DatePickerDemo() is defined in apps/v4/registry/new-york-v4/examples/date-picker-demo.tsx at line 16.

Analyze Your Own Codebase

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

Try Supermodel Free