Home / Function/ DatePickerSimple() — ui Function Reference

DatePickerSimple() — ui Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  612f062e_68e6_66f5_4abc_e8db7600749f["DatePickerSimple()"]
  6fa69f30_a76c_b517_69ae_648df0d637a8["date-picker-basic.tsx"]
  612f062e_68e6_66f5_4abc_e8db7600749f -->|defined in| 6fa69f30_a76c_b517_69ae_648df0d637a8
  style 612f062e_68e6_66f5_4abc_e8db7600749f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/radix/date-picker-basic.tsx lines 14–41

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

  return (
    <Field className="mx-auto w-44">
      <FieldLabel htmlFor="date-picker-simple">Date</FieldLabel>
      <Popover>
        <PopoverTrigger asChild>
          <Button
            variant="outline"
            id="date-picker-simple"
            className="justify-start font-normal"
          >
            {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}
            defaultMonth={date}
          />
        </PopoverContent>
      </Popover>
    </Field>
  )
}

Subdomains

Frequently Asked Questions

What does DatePickerSimple() do?
DatePickerSimple() is a function in the ui codebase, defined in apps/v4/examples/radix/date-picker-basic.tsx.
Where is DatePickerSimple() defined?
DatePickerSimple() is defined in apps/v4/examples/radix/date-picker-basic.tsx at line 14.

Analyze Your Own Codebase

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

Try Supermodel Free