Hi i followed the datepicker process in order to change the language via the sample: https://jqueryui.com/datepicker/#localization
The problem is that the event is not working, the files are loaded. and it chnages the format, but only for the last imported datepicker: example:
- i18n/datepicker-en.js
- i18n/datepicker-fr.js
- i18n/datepicker-zh.js <- Thuis gets loaded.
i tried binding an event to a button:
`
var changeLang = function() {
var language = $.cookie('date_format')
language ='fr'
var picker1= $('#dateStart').datepicker
$('#dateStart').datepicker( $.datepicker.regional[ language ] );
var picker2= $('#dateStart').datepicker
$('#dateEnd').datepicker( $.datepicker.regional[ language ] );
$('#dateShift').datepicker( $.datepicker.regional[ language ] );
}
<button onclick="changeLang()">Test</button>
`
I tried binding on load, document.ready nothing works. Any tips?
Thank you