Skip to content

Labels and translation ​

The picker has a few fixed texts. Change them with the labels option:

js
FlowDatepicker.init(document, {
  labels: {
    today: 'Heute',
    clear: 'Leeren',
    now: 'Jetzt',
    previousMonth: 'Vorheriger Monat',
    nextMonth: 'Nächster Monat'
  }
});

Labels can also be set per picker with new FlowDatepicker(element, { labels }) or picker.setOptions({ labels }).

LabelDefaultWhere
chooseDateChoose datepopover and icon name, date mode
chooseTimeChoose timetime mode
chooseDateTimeChoose date and timedate and time mode
chooseRangeChoose date rangerange mode
previousMonth, nextMonthPrevious month, Next monthmonth arrows
selectRangeSelect datesempty range trigger
presetsPresetspresets list name
weekToDate, monthToDate, yearToDateWeek to date, ...default presets
lastDaysLast {n} daysdefault presets, {n} is the number
customRangeCustom rangewith calendar: 'custom'
today, now, clearToday, Now, Clearfooter buttons
hour, minute, second, dayPeriodHour, Minute, Second, AM/PMtime parts for screen readers

Month and weekday names, dates and AM/PM come from the page language and need no labels. See Languages and formats.

All labels are inserted as text, never as HTML.

Released under the MIT License.