---
title: "Angular Date & Time RTL mode Example | Mobiscroll"
component: "Date & Time"
framework: "Angular"
library_version: "6.2.0"
url: "https://demo.mobiscroll.com/angular/datetime/rtl-right-to-left"
---

# RTL mode - Angular Date & Time demo

Angular datetime picker with RTL support. Manual control and built-in right to left languages: Arabic, Hebrew, Farsi.

- [Live demo](https://demo.mobiscroll.com/angular/datetime/rtl-right-to-left)
- [View code on GitHub](https://github.com/acidb/mobiscroll-demos-angular/tree/main/src/demos/datepicker/datetime/rtl-right-to-left)
- This demo in other frameworks: [JavaScript](https://demo.mobiscroll.com/datetime/rtl-right-to-left.md), [jQuery](https://demo.mobiscroll.com/jquery/datetime/rtl-right-to-left.md), [React](https://demo.mobiscroll.com/react/datetime/rtl-right-to-left.md), [Vue](https://demo.mobiscroll.com/vue/datetime/rtl-right-to-left.md)

## Description

RTL support is built in and can be explicitly controlled through the `rtl` option. If not set, it is inherited from the [`locale`](https://mobiscroll.com/docs/angular/datepicker/api#localization-locale) settings.

**Explore the different locales** [Check out this example →](https://demo.mobiscroll.com/angular/datetime/localization)

## What this demo shows

- Shows a wheel-style inline date picker with RTL mode enabled.
- **RTL control** A side panel next to the date picker includes an `Enable Right-To-Left rendering` switch, which is enabled by default.
- **Inline date picker** The example embeds the picker directly in the page without an input by using inline display mode.
- **Date selection** Separate scrollable wheels let users select the AM/PM, minute, hours and the exact date. The selected values appear in a central selection area, while neighboring values remain visually subdued.
- **Scrolling behavior** Users can scroll vertically through neighboring values to move between dates, including dates in other months or years.

## Best for

- **RTL interfaces** Building date picker calendars for products used in right-to-left languages such as Arabic, Hebrew, or Farsi.
- **Multilingual applications** Supporting users who need the same date picker workflow in both LTR and RTL rendering modes.

## Tutorial

### Enable Right-To-Left rendering

- [x] Turn RTL on

```html
<mbsc-datepicker
    [rtl]="true">
</mbsc-datepicker>
```

## API used in this demo

- [`theme`](https://mobiscroll.com/docs/angular/datepicker/api#opt-theme) - option
- [`themeVariant`](https://mobiscroll.com/docs/angular/datepicker/api#opt-themeVariant) - option
- [`controls`](https://mobiscroll.com/docs/angular/datepicker/api#opt-controls) - option
- [`rtl`](https://mobiscroll.com/docs/angular/datepicker/api#localization-rtl) - option
- [`display`](https://mobiscroll.com/docs/angular/datepicker/api#opt-display) - option

## Code

### Component

```ts
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { MbscModule, setOptions } from '@mobiscroll/angular';

setOptions({
  theme: 'ios',
  themeVariant: 'light'
});

@Component({
  selector: 'app-root', 
  templateUrl: './app.component.html',
  standalone: true,
  imports: [CommonModule, MbscModule],
})
export class AppComponent {}
```

### Template

```html
<mbsc-datepicker [controls]="['datetime']" [rtl]="true" display="inline" placeholder="Please Select..."></mbsc-datepicker>
```

## Implementation notes

- Use `controls: ['datetime']` and `display: 'inline'`.
- Set `rtl: true` to mirror the entire wheel layout - the AM/PM, minute, hour, and date wheel columns all flip order and direction, and all supporting UI text aligns right-to-left; `rtl: false` (or omitting it) renders left-to-right.
- Toggle at runtime via `setOptions({ rtl: true | false })` on the instance.
- Pair `rtl` with a matching RTL `locale` (e.g. `mobiscroll.locale.ar`, `mobiscroll.locale.he`) when the language itself is right-to-left, since `rtl` only controls layout direction, not translated day/month names.

## Run it in your project

1. If not signed up yet, or don't own a license, you can [start a free trial](https://mobiscroll.com/starttrial).

2. Clone the repository:

   ```
   git clone https://github.com/acidb/mobiscroll-demos-angular.git
   ```

3. If not installed yet, install the Mobiscroll CLI from NPM:

   ```
   npm install -g @mobiscroll/cli
   ```

4. Config Mobiscroll - open a terminal window in the root directory and run:

   ```
   mobiscroll config angular
   ```

5. Install dependencies - open a terminal window in the root directory and run:

   ```
   npm install
   ```

6. Run the project:

   ```
   ng serve
   ```

On a trial, add `--trial` to the config command: `mobiscroll config angular --trial`.

Running a demo locally requires a Mobiscroll trial or a license; setup is per framework at https://mobiscroll.com/docs/angular/getting-started/installation

## Related demos

- Previous: [Localization](https://demo.mobiscroll.com/angular/datetime/localization.md) - Angular Date & time picker localization example supporting 37 languages, date, time formats with full RTL capability.
