Home / Function/ DataPickerWithDropdowns() — ui Function Reference

DataPickerWithDropdowns() — ui Function Reference

Architecture documentation for the DataPickerWithDropdowns() function in data-picker-with-dropdowns.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  b615642d_182d_3ad3_cb9e_3ba2886141f1["DataPickerWithDropdowns()"]
  156ee552_8000_2f11_1dcd_dc165abb7c72["data-picker-with-dropdowns.tsx"]
  b615642d_182d_3ad3_cb9e_3ba2886141f1 -->|defined in| 156ee552_8000_2f11_1dcd_dc165abb7c72
  style b615642d_182d_3ad3_cb9e_3ba2886141f1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/radix/data-picker-with-dropdowns.tsx lines 15–56

export function DataPickerWithDropdowns() {
  const [date, setDate] = React.useState<Date>()
  const [open, setOpen] = React.useState(false)

  return (
    <Field className="mx-auto w-72">
      <Popover open={open} onOpenChange={setOpen}>
        <FieldLabel htmlFor="date-picker-with-dropdowns-desktop">
          Date
        </FieldLabel>
        <PopoverTrigger asChild>
          <Button
            variant="outline"
            id="date-picker-with-dropdowns-desktop"
            className="justify-start px-2.5 font-normal"
          >
            {date ? format(date, "PPP") : <span>Pick a date</span>}
            <ChevronDownIcon className="ml-auto" />
          </Button>
        </PopoverTrigger>
        <PopoverContent className="w-auto p-0" align="start">
          <Calendar
            mode="single"
            selected={date}
            onSelect={setDate}
            captionLayout="dropdown"
          />
          <div className="flex gap-2 border-t p-2">
            <Button
              variant="outline"
              size="sm"
              className="w-full"
              onClick={() => setOpen(false)}
            >
              Done
            </Button>
          </div>
        </PopoverContent>
      </Popover>
    </Field>
  )
}

Subdomains

Frequently Asked Questions

What does DataPickerWithDropdowns() do?
DataPickerWithDropdowns() is a function in the ui codebase, defined in apps/v4/examples/radix/data-picker-with-dropdowns.tsx.
Where is DataPickerWithDropdowns() defined?
DataPickerWithDropdowns() is defined in apps/v4/examples/radix/data-picker-with-dropdowns.tsx at line 15.

Analyze Your Own Codebase

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

Try Supermodel Free