Localization
flatpickr can be localized per-instance, or globally.
Using plain
const flatpickr = require("flatpickr");
const Russian = require("flatpickr/dist/l10n/ru.js").default.ru;
});
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>
Localize globally (for all instances):
flatpickr.localize(flatpickr.l10ns.ru);
If you’d like the option to persist regardless of locale, use the locale
option to override specific fields:
flatpickr(myElem, {
locale: {
firstDayOfWeek: 2
});