Flatpickr year disapear when english locale

I experience a weird result with flatpickr when I try to define the default language (English). The year disappear from date picker

function getUserLanguage() {
        const userLang = window.navigator.language || window.navigator.userLanguage;
        return userLang.substring(0, 2);

    const lang = getUserLanguage();

    const locales = {
        'fr': French.fr,
        'it': Italian.it

    flatpickr('.flatpickr', {
        allowInput: true,
        altFormat: 'd-m-Y',
        altInput: true,
        altInputClass: 'form-control flatpickr-input',
        dateFormat: 'Y-m-d',
        locale: locales[lang] || 'en',
        onClose(dates, currentdatestring, picker){
          picker.setDate(picker.altInput.value, true, picker.config.altFormat)

My browser is in english

Result in english:


Result in french (with French.fr)