Expand my Community achievements bar.

AEM DatePicker localization

Avatar

Level 3

I'm facing an issue with the localization of a date picker component.

 

Our adaptive forms can be accessed with multiple locals, like en-us or de-ch. Now, the English date format should be "December 18, 2025" while the Swiss date format should look like "18. Dezember 2025" when the date is enetered via date picker.

for that we set the used the properties: type: April 01, 2007 and the pattern: date{MMMM DD, YYYY}

 

While it works when we open the adaptive form with the en-us locale, when the form is opened with the de-ch locale the date stays the same and only the name of the month is localized - like: Dezember 18, 2025.

 

Any help?

 

1 Reply

Avatar

Employee

Hi @marcink-lwR9iu,

 

The issue you are facing related to the date picker component is that when you are using the OOTB component, by default, there is no pattern selected.

If you do not specify any pattern to view the date, it takes the calendar preview, which is provided by the browser locale itself and all the names for months are displayed based on the default language of the browser.

If you change the default language setting for your browser, you will be able to see the month name in a translated version for the specified language since the value is dependent on the browser itself. If you do not apply any specific pattern while configuring the date picker component by default it uses the language in which the browser is configured, that is the reason you were not able to see the name for the months in the specific locale.

If you need to view the month names in your locale, you will need to specify a default pattern to the date picker and then try to view the form field. It should pick up the month names if the translations are in place for the specified locale.

Let me know if you need any additional information and I will be happy to help.

Thanks
Pranay