snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
28
apps/v4/examples/aria/calendar-rtl.tsx
Normal file
28
apps/v4/examples/aria/calendar-rtl.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
"use client"
|
||||
|
||||
import * as React from "react"
|
||||
import {
|
||||
getLocalTimeZone,
|
||||
today,
|
||||
type CalendarDate,
|
||||
} from "@internationalized/date"
|
||||
import { I18nProvider } from "react-aria-components"
|
||||
|
||||
import { Calendar } from "@/styles/aria-nova/ui-rtl/calendar"
|
||||
|
||||
export function CalendarRtl() {
|
||||
const [date, setDate] = React.useState<CalendarDate | undefined>(
|
||||
today(getLocalTimeZone())
|
||||
)
|
||||
|
||||
return (
|
||||
<I18nProvider locale="ar">
|
||||
<Calendar
|
||||
value={date}
|
||||
onChange={setDate}
|
||||
className="rounded-lg border [--cell-size:--spacing(9)]"
|
||||
captionLayout="dropdown"
|
||||
/>
|
||||
</I18nProvider>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user