AnalyticsDatePicker() — ui Function Reference
Architecture documentation for the AnalyticsDatePicker() function in analytics-date-picker.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 952ee78b_9a1e_3ab4_3b6a_aee38a70b989["AnalyticsDatePicker()"] b322b706_f3c3_4eef_b0b3_048c74d65060["analytics-date-picker.tsx"] 952ee78b_9a1e_3ab4_3b6a_aee38a70b989 -->|defined in| b322b706_f3c3_4eef_b0b3_048c74d65060 style 952ee78b_9a1e_3ab4_3b6a_aee38a70b989 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/app/(examples)/dashboard-03/components/analytics-date-picker.tsx lines 17–61
export function AnalyticsDatePicker() {
const [date, setDate] = React.useState<DateRange | undefined>({
from: new Date(new Date().getFullYear(), 0, 20),
to: addDays(new Date(new Date().getFullYear(), 0, 20), 20),
})
return (
<Popover>
<PopoverTrigger asChild>
<Button
id="date"
variant="outline"
className={cn(
"w-fit justify-start px-2 font-normal",
!date && "text-muted-foreground"
)}
>
<CalendarIcon className="text-muted-foreground" />
{date?.from ? (
date.to ? (
<>
{format(date.from, "LLL dd, y")} -{" "}
{format(date.to, "LLL dd, y")}
</>
) : (
format(date.from, "LLL dd, y")
)
) : (
<span>Pick a date</span>
)}
</Button>
</PopoverTrigger>
<PopoverContent className="w-auto p-0" align="end">
<Calendar
initialFocus
mode="range"
defaultMonth={date?.from}
selected={date}
onSelect={setDate}
numberOfMonths={2}
/>
</PopoverContent>
</Popover>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does AnalyticsDatePicker() do?
AnalyticsDatePicker() is a function in the ui codebase, defined in apps/v4/app/(examples)/dashboard-03/components/analytics-date-picker.tsx.
Where is AnalyticsDatePicker() defined?
AnalyticsDatePicker() is defined in apps/v4/app/(examples)/dashboard-03/components/analytics-date-picker.tsx at line 17.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free