Change language of date picker

I’m using spanish language file provided by community (http://www.hkvforums.com/viewtopic.php?f=18&t=45588). But I don’t know how to change language for date picker. It still shows days and months names in english. Any idea?

After reading docs (http://eonasdan.github.io/bootstrap-datetimepicker/#using-locales) I tried this in Add Page/Startup Script but it didn’t work:
$(‘#x_birthday’).datetimepicker({
locale: ‘es’
});

Browser console says: TypeError: $(…).datetimepicker is not a function

If your main language file (.xml) has id=“es”, then the language file for the same id will be used automatically by the date time picker.

Yes, it is.

In installation root, xml language file:

In generated files, xml language file:

Maybe the spanish language file of datetipcker has not been installed. Any idea where datepicker installation folder is?

If v2020, the date time picker uses the \moment\locale\es.js.

Well the file “es.js” already exists in \moment\locale\es.js.

Any other idea? maybe making work this (as I mentioned before, it didn’t work on Add Page/Startup Script):
$(‘#x_birthday’).datetimepicker({
locale: ‘es’
});

to make a manual fix. I’m interested in making it work because I also want to do another changes to date/time picker like disabling timepicker (just use datepicker), hiding datepicker (just use timepicker).

I have tested and it does work and uses the es.js properly. If you have enabled the date/time picker in the UI, the code is automatically generated, you do not need to do anything.

gcjesus89 wrote:

Browser console says: TypeError: $(…).datetimepicker is not a function

You probably tried to insert your code at a wrong place manually.