Fernando
Posts: 0
Joined: Sat Mar 14, 2015 10:59 am

Datepicker regional translate (multilingual app)

Hi.

I want to translate datepicker element. I've created a javascript with this content and name:
https://github.com/jquery/jquery-ui/b...

Then, in load event i put this:
$.datepicker.setDefaults($.datepicker.regional["de"]);
(from http://api.jqueryui.com/datepicker/)

But the dateFormat and dayNamesShort doen't appear in german.

Thank you.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Datepicker regional translate (multilingual app)

Hello Fernando,

You have to use jQuery selector for the datepicker, e.g:

pre$("[name=datepicker_name]").datepicker($.datepicker.regional[ "de" ] ).refresh();/pre

here datepicker_name - name of the datepicker

Fernando
Posts: 0
Joined: Sat Mar 14, 2015 10:59 am

Datepicker regional translate (multilingual app)

I have tried this, but now i have two datepickers: the original one (in spanish) and below the new one (in german). The original one is shown and hidenn when i click the datepicker icon (see the images). Image Image

Fernando
Posts: 0
Joined: Sat Mar 14, 2015 10:59 am

Datepicker regional translate (multilingual app)

If i put datepicker's name in this way

$("[name=webpagename_datepickername]").datepicker($.datepicker.regional[ "de" ] ).refresh();

then i have only one datepicker, but not apply all the translations, like "monthNames", "dayNamesShort" and "Date Format" doesn't change.

I solved translation problems using this:
$('[dsid="datepickername"]').datepicker($.datepicker.regional[ "de" ] );

But now i have two problems:
1) "date format" is not applied
2) "minDate" and "maxDate" doesn't work. I've tried with:
Appery("datepickername").datepicker_dataPickerOptions.maxDate = "+1M +10D";
Appery("datepickername").datepicker_dataPickerOptions.minDate = -20;
Appery('datepickername').datepicker_dataPickerOptions.hideIfNoPrevNext = true;
Appery('datepickername').initializeDataPicker();

Also i have "minDate" and "maxDate" defined in the component.

Some idea?
Thanks for your time.

Best regards.

Return to “Issues”