1

I have added a input field and are using the pikaday calender. Have changed the months, days from english to danish language by including the local/da script: but the month and date text wont change in the input field.

<script>
    var Today = new Date();
    moment.locale('da');
    var daDate = {
        previousMonth: 'Forrige måned',
        nextMonth: 'Næste måned',
        months: moment.localeData()._months,
        weekdays: moment.localeData()._weekdays,
        weekdaysShort: moment.localeData()._weekdaysShort
    };
    var picker = new Pikaday({
        field: document.getElementById('datepicker'),
        minDate: new Date(),
        maxDate: new Date(2030, 12, 31),
        setDefaultDate: true,
        i18n: daDate,
        firstDay: 1
    });
    picker.setDate(Today.getDate());

</script>
  • Did you have a look at [this](https://stackoverflow.com/questions/51756403/pikaday-i18n-still-showing-names-of-the-days-and-months-in-english) SO question? – Jeroen Heier Aug 19 '19 at 19:10

0 Answers0