Home / Function/ DatePickerSimple() — ui Function Reference

DatePickerSimple() — ui Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

apps/v4/app/(internal)/sink/components/date-picker-demo.tsx lines 36–58

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

  return (
    <Popover>
      <PopoverTrigger asChild>
        <Button
          variant={"outline"}
          className={cn(
            "min-w-[200px] justify-start px-2 font-normal",
            !date && "text-muted-foreground"
          )}
        >
          <CalendarIcon className="text-muted-foreground" />
          {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} />
      </PopoverContent>
    </Popover>
  )
}

Subdomains

Frequently Asked Questions

What does DatePickerSimple() do?
DatePickerSimple() is a function in the ui codebase, defined in apps/v4/app/(internal)/sink/components/date-picker-demo.tsx.
Where is DatePickerSimple() defined?
DatePickerSimple() is defined in apps/v4/app/(internal)/sink/components/date-picker-demo.tsx at line 36.

Analyze Your Own Codebase

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

Try Supermodel Free