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
  a3505278_62e3_0340_ffc9_151583c71120["DatePickerDemo()"]
  e0a7eb89_30dd_c921_6486_3802640b8d59["date-picker-demo.tsx"]
  a3505278_62e3_0340_ffc9_151583c71120 -->|defined in| e0a7eb89_30dd_c921_6486_3802640b8d59
  style a3505278_62e3_0340_ffc9_151583c71120 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/internal/sink/components/date-picker-demo.tsx lines 16–43

export 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 deprecated/www/registry/new-york/internal/sink/components/date-picker-demo.tsx.
Where is DatePickerDemo() defined?
DatePickerDemo() is defined in deprecated/www/registry/new-york/internal/sink/components/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