Date picker in Arabic, right to left
Set `locale` to an Arabic tag. The panel reads right to left, the week starts on the day of the country, and the arrow keys follow the reading direction.
The code
import { createDatePicker } from '@nervure/datetime';
createDatePicker('#field', {
locale: 'ar-TN',
zone: 'Africa/Tunis',
onChange: (selection) => console.log(selection.value, selection.start, selection.end),
});The value is '2026-12-04'. Read the guide for every option, and see every example.
What it does
- Month and day names, and the digits, come from the browser for each Arabic locale.
- The words of the picker are written in Arabic;
labelsreplaces any of them. - The value stays ISO 8601 text in Latin digits: it is made for your code, not for the reader.
Why this one
- No dependency, about 18 kB gzipped for every mode, zone and language.
- Values are ISO 8601 text. Each selection also gives two instants,
startandend, in the time zone. - 28 languages and right to left. Keyboard and screen readers.
- Your CSS and your colours, through CSS variables. Light and dark.
- The same picker in plain JavaScript, as a web component, in React and in Vue.