Localization

Dozens of locales are available.

Flatpickr can be localized per-instance, or globally.

Using Modules

const Flatpickr = require("flatpickr");
const Russian = require("flatpickr/dist/l10n/ru.js").ru;
// or.. import {ru} from "flatpickr/dist/l10n/ru.js"

new Flatpickr(myElem, {
    "locale": Russian // locale for this instance only
});

Localize globally (for all instances):

const Russian = require("flatpickr/dist/l10n/ru.js").ru;
Flatpickr.localize(Russian); // default locale is now Russian

new Flatpickr(myElem);

Localization in a Browser Environment

<script src="https://npmcdn.com/flatpickr/dist/flatpickr.min.js"></script>
<script src="https://npmcdn.com/flatpickr/dist/l10n/ru.js"></script>
new Flatpickr(myElement, {
    "locale": "ru"  // locale for this instance only
});

Localize globally (for all instances):

Flatpickr.localize(Flatpickr.l10ns.ru);
flatpickr("mySelector");

You may also wish to modify only certain values of locale. For instance, to set the first day of the week to Monday:

Flatpickr.l10ns.default.firstDayOfWeek = 1; // Monday

If you’d like the option to persist regardless of locale, use the locale option to override specific fields:

new Flatpickr(myElem, {
    locale: {
        firstDayOfWeek: 2
    }
});