I've set the locale of the datepicker to en-GB and I've loaded the data correctly using CLDR. I get an error in the console:
```
calendar.js:279 Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at DatePickerComponent.CalendarBase.getCultureValues (calendar.js:279)
at DatePickerComponent.CalendarBase.createContentHeader (calendar.js:315)
at DatePickerComponent.CalendarBase.createContent (calendar.js:262)
at DatePickerComponent.Calendar.createContent (calendar.js:2114)
at DatePickerComponent.CalendarBase.render (calendar.js:134)
at DatePickerComponent.Calendar.render (calendar.js:1999)
at DatePickerComponent.DatePicker.disabledDates (datepicker.js:1595)
at DatePickerComponent.DatePicker.updateInput (datepicker.js:217)
at DatePickerComponent.DatePicker.initialize (datepicker.js:140)
at DatePickerComponent.DatePicker.render (datepicker.js:85)
at DatePickerComponent.render (datepicker.component.js:32)
at DatePickerComponent.Component.appendTo (component.js:148)
at DatePickerComponent.ComponentBase.renderReactComponent (component-base.js:72)
```
When looking into it, it seems as though it fails on line 1533 in calendar.js:
```
getValue(mainVal + '' + this.locale + gregorianFormat, ld)
```
the values passed to the function are:
1st arg: main.en-GB.dates.calendars.gregorian.days.format.short
2nd arg: {
- default:
- main:
- en-GB:
- dates:
- calendars:
- gregorian:
- dateFormats: {full: "EEEE, d MMMM y", long: "d MMMM y", medium: "d MMM y", short: "dd/MM/y"}
- dateTimeFormats: {full: "{1} 'at' {0}", long: "{1} 'at' {0}", medium: "{1}, {0}", short: "{1}, {0}", availableFormats: {…}, …}
- dayPeriods: {format: {…}, stand-alone: {…}}
- days:
- format:
- abbreviated: {sun: "Sun", mon: "Mon", tue: "Tue", wed: "Wed", thu: "Thu", …}
- narrow: {sun: "S", mon: "M", tue: "T", wed: "W", thu: "T", …}
- short:
- fri: "Fr"
- mon: "Mo"
- sat: "Sa"
- sun: "Su"
- thu: "Th"
- tue: "Tu"
- wed: "We"
- __proto__: Object
- wide: {sun: "Sunday", mon: "Monday", tue: "Tuesday", wed: "Wednesday", thu: "Thursday", …}
- __proto__: Object
- stand-alone: {abbreviated: {…}, narrow: {…}, short: {…}, wide: {…}}
- __proto__: Object
- eras: {eraNames: {…}, eraAbbr: {…}, eraNarrow: {…}}
- months: {format: {…}, stand-alone: {…}}
- quarters: {format: {…}, stand-alone: {…}}
- timeFormats: {full: "HH:mm:ss zzzz", long: "HH:mm:ss z", medium: "HH:mm:ss", short: "HH:mm"}
- __proto__: Object
- __proto__: Object
- timeZoneNames: {hourFormat: "+HH:mm;-HH:mm", gmtFormat: "GMT{0}", gmtZeroFormat: "GMT", regionFormat: "{0} Time", regionFormat-type-daylight: "{0} Daylight Time", …}
- __proto__: Object
- identity: {version: {…}, language: "en", territory: "GB"}
- numbers: {defaultNumberingSystem: "latn", otherNumberingSystems: {…}, minimumGroupingDigits: "1", symbols-numberSystem-latn: {…}, decimalFormats-numberSystem-latn: {…}, …}
- __proto__: Object
- __proto__: Object
- supplemental: {version: {…}, numberingSystems: {…}, weekData: {…}}
}
If I change the 1st arg so that it is prepended with 'default." the error goes but the calendar still doesn't show Monday as the first day of the week, which I would expect because I am loading the weekData.json which states that the "firstDay" value for "GB" is "mon".
Please can you look into the above issues and let me know what I can do to get datepicker to correctly display the first day of the week as Monday when I pass in the locale as "en-GB".
Thank you
Gez