Datepicker problem when I call datepicker() on a div
When I call datepicker() on a div an I try to localize the calendar it doesn't show the corresponding language until I click in some option of the datepicker. The first time it doesn't work but the next times it does.
- $.datepicker.setDefaults($.datepicker.regional['es']);
- $("#calendarDiv").datepicker({
- changeMonth: true,
- changeYear: true,
- showOtherMonths: true,
- showButtonPanel: true,
- dateFormat: 'yy-mm-dd',
- minDate: '-5y',
- maxDate: '+2y',
- hideIfNoPrevNext: true
- });
But if I call datepicker() on an Input it works perfectly showing the Spanish language since first time I click on the input.