date-picker-time.tsx — ui Source File
Architecture documentation for date-picker-time.tsx, a tsx file in the ui codebase. 8 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 36c5e266_fa08_0402_9820_70783c11a123["date-picker-time.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 36c5e266_fa08_0402_9820_70783c11a123 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 4544fa74_9b37_0912_c55e_f4ff161b8e83["button"] 36c5e266_fa08_0402_9820_70783c11a123 --> 4544fa74_9b37_0912_c55e_f4ff161b8e83 a8023de3_411c_8d95_59e9_37549a0c2d75["calendar"] 36c5e266_fa08_0402_9820_70783c11a123 --> a8023de3_411c_8d95_59e9_37549a0c2d75 e6c524b5_d047_d4f9_50b2_7f100d612cb2["field"] 36c5e266_fa08_0402_9820_70783c11a123 --> e6c524b5_d047_d4f9_50b2_7f100d612cb2 9a309fc5_4306_d01f_08ce_72db23e48652["input"] 36c5e266_fa08_0402_9820_70783c11a123 --> 9a309fc5_4306_d01f_08ce_72db23e48652 a3e47561_21be_d5cd_a896_ddf369cf7b61["popover"] 36c5e266_fa08_0402_9820_70783c11a123 --> a3e47561_21be_d5cd_a896_ddf369cf7b61 f9e8c1ea_9de4_3e04_ca27_b15cada2e81e["date-fns"] 36c5e266_fa08_0402_9820_70783c11a123 --> f9e8c1ea_9de4_3e04_ca27_b15cada2e81e d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] 36c5e266_fa08_0402_9820_70783c11a123 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 style 36c5e266_fa08_0402_9820_70783c11a123 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { Button } from "@/examples/base/ui/button"
import { Calendar } from "@/examples/base/ui/calendar"
import { Field, FieldGroup, FieldLabel } from "@/examples/base/ui/field"
import { Input } from "@/examples/base/ui/input"
import {
Popover,
PopoverContent,
PopoverTrigger,
} from "@/examples/base/ui/popover"
import { format } from "date-fns"
import { ChevronDownIcon } from "lucide-react"
export function DatePickerTime() {
const [open, setOpen] = React.useState(false)
const [date, setDate] = React.useState<Date | undefined>(undefined)
return (
<FieldGroup className="mx-auto max-w-xs flex-row">
<Field>
<FieldLabel htmlFor="date-picker-optional">Date</FieldLabel>
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger
render={
<Button
variant="outline"
id="date-picker-optional"
className="w-32 justify-between font-normal"
/>
}
>
{date ? format(date, "PPP") : "Select date"}
<ChevronDownIcon data-icon="inline-end" />
</PopoverTrigger>
<PopoverContent className="w-auto overflow-hidden p-0" align="start">
<Calendar
mode="single"
selected={date}
captionLayout="dropdown"
defaultMonth={date}
onSelect={(date) => {
setDate(date)
setOpen(false)
}}
/>
</PopoverContent>
</Popover>
</Field>
<Field className="w-32">
<FieldLabel htmlFor="time-picker-optional">Time</FieldLabel>
<Input
type="time"
id="time-picker-optional"
step="1"
defaultValue="10:30:00"
className="bg-background appearance-none [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none"
/>
</Field>
</FieldGroup>
)
}
Domain
Subdomains
Functions
Dependencies
- button
- calendar
- date-fns
- field
- input
- lucide-react
- popover
- react
Source
Frequently Asked Questions
What does date-picker-time.tsx do?
date-picker-time.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, Changelog subdomain.
What functions are defined in date-picker-time.tsx?
date-picker-time.tsx defines 1 function(s): DatePickerTime.
What does date-picker-time.tsx depend on?
date-picker-time.tsx imports 8 module(s): button, calendar, date-fns, field, input, lucide-react, popover, react.
Where is date-picker-time.tsx in the architecture?
date-picker-time.tsx is located at apps/v4/examples/base/date-picker-time.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/examples/base).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free