I am running into an error when applying localization using the LocaleHelper and LocaleManager. The dates show up in the localized language (JP), and the L function labels are present. However, when I select a different date on the Calendar date selector, an error is thrown.
Any ideas why? I'm using v5.3.5.
Uncaught (in promise) Error: Calendar widget date ingestion must be passed a Date, or a YYYY-MM-DD date string
const localeName = 'default';
const localeDesc = 'Default Locale';
const localeCode = 'ja';
useEffect(() => {
LocaleHelper.publishLocale({
localeName,
localeDesc,
localCode: localeCode,
DateHelper: {
locale: localeCode,
},
});
LocaleManager.applyLocale(localeName);
}, []);
Note, I am using a useEffect to register the locale on initial render. If I do not use a useEffect, the UI does not load successfully, and I receive the following error: