DatePickerRtl() — ui Function Reference
Architecture documentation for the DatePickerRtl() function in date-picker-rtl.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 74695a50_964d_f84e_c1f7_6731aee96c3e["DatePickerRtl()"] 537c25dd_885c_aa88_5995_3f57485d27e7["date-picker-rtl.tsx"] 74695a50_964d_f84e_c1f7_6731aee96c3e -->|defined in| 537c25dd_885c_aa88_5995_3f57485d27e7 style 74695a50_964d_f84e_c1f7_6731aee96c3e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/base/date-picker-rtl.tsx lines 55–99
export function DatePickerRtl() {
const { dir, t, language } = useTranslation(translations, "ar")
const [date, setDate] = React.useState<Date>()
const dateFnsLocale =
dir === "rtl"
? dateFnsLocales[language as keyof typeof dateFnsLocales]
: undefined
const dayPickerLocale =
dir === "rtl"
? dayPickerLocales[language as keyof typeof dayPickerLocales]
: undefined
return (
<Popover>
<PopoverTrigger
render={
<Button
variant={"outline"}
data-empty={!date}
className="data-[empty=true]:text-muted-foreground w-[212px] justify-between text-left font-normal"
dir={dir}
/>
}
>
{date ? (
format(date, "PPP", { locale: dateFnsLocale })
) : (
<span>{t.placeholder}</span>
)}
<ChevronDownIcon data-icon="inline-end" />
</PopoverTrigger>
<PopoverContent className="w-auto p-0" align="start" dir={dir}>
<Calendar
mode="single"
selected={date}
onSelect={setDate}
defaultMonth={date}
dir={dir}
locale={dayPickerLocale}
/>
</PopoverContent>
</Popover>
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does DatePickerRtl() do?
DatePickerRtl() is a function in the ui codebase, defined in apps/v4/examples/base/date-picker-rtl.tsx.
Where is DatePickerRtl() defined?
DatePickerRtl() is defined in apps/v4/examples/base/date-picker-rtl.tsx at line 55.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free