# Date input (UI SDK): Right to left

> The parts keep the locale’s order, and the arrow keys follow them on screen.

Canonical: https://hextaui.com/docs/ui-sdk-date-input/examples/rtl

Component docs: https://hextaui.com/docs/ui-sdk-date-input

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/ui-sdk-date-input-rtl.json
```

This adds `components/examples/ui-sdk-date-input/rtl.tsx` with the Date input component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/ui-sdk-date-input/rtl.tsx"
import { IconCalendar } from "@tabler/icons-react"

import { Label } from "@/components/ui/label"
import { DateInput, DateInputSegments } from "@/components/ui/ui-sdk-date-input"

function UiSdkDateInputRtl() {
  return (
    <div dir="rtl" lang="ar" className="flex w-full max-w-44 flex-col gap-2">
      <Label id="rtl-date">تاريخ البدء</Label>
      <DateInput
        aria-labelledby="rtl-date"
        locale="ar-EG"
        defaultValue="2026-11-02"
      >
        <IconCalendar aria-hidden="true" />
        <DateInputSegments />
      </DateInput>
    </div>
  )
}

export { UiSdkDateInputRtl }
```

## Props in this example

### DateInput

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValue` | `string \| null` | – |  |
| `locale` | `string` | – | Defaults to the page’s language. |

## More Date input examples

- [Date and time](https://hextaui.com/docs/ui-sdk-date-input/examples/date-time)
- [Min and max](https://hextaui.com/docs/ui-sdk-date-input/examples/min-max)
- [Unavailable dates](https://hextaui.com/docs/ui-sdk-date-input/examples/unavailable)
- [Locale](https://hextaui.com/docs/ui-sdk-date-input/examples/locale)
- [Form](https://hextaui.com/docs/ui-sdk-date-input/examples/form)
- [Controller](https://hextaui.com/docs/ui-sdk-date-input/examples/controller)
- [Disabled](https://hextaui.com/docs/ui-sdk-date-input/examples/disabled)
- [Read-only](https://hextaui.com/docs/ui-sdk-date-input/examples/read-only)
