Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Language translation in jquery date picker

How can I include both language translation and changeMonth and changeYear options together in jquery date picker. For that I used the below code For Language translation

$(this).datepicker($.datepicker.regional['fr']);

For ChangeYear

$( this ).datepicker({
      changeMonth: true,
      changeYear: true
    });

I want to run these two in a single datepicker box.Please help

like image 562
Nithin Viswanathan Avatar asked Aug 27 '13 12:08

Nithin Viswanathan


1 Answers

Looking at the source the regional is an object with options so this should work:

$(this).datepicker($.extend({}, $.datepicker.regional['fr'], {
  changeMonth: true,
  changeYear: true
}));
like image 91
jcubic Avatar answered Oct 05 '22 03:10

jcubic