Hallo,
we use igDatePicker inside igGrid together with the loader. now we set the loader to:
$.ig.loader({scriptPath : 'js/',cssPath : 'css/',resources : 'igGrid.Resizing.Updating,igCombo',regional:'de',ready : ...
which loads the regionalfile infragistics.ui.regional-de.js .
This file contains the datePatterns and language translations. The datePatterns are assigned correctly, but the translations are not and the datePicker is displayed in english.
Setting locale:'de' in the loader did also not help. $.ig.regional.defaults show the german translations.
Any Idea? Where does the magic happen? :) Thanks.
Hello Karl,
thanks for this solution. It works.
@Infragistics-Team:
This thread is from 2012. In your actual Version 13.2 this bug is still a part of the DatePicker. It cost several times to get a solution. It is time to eliminate this bug or to update the documantation!
Having just encountered this issue myself, I have realized that there are a couple of things wrong with both the documentation and the implementation of the regional settings.
The first issue is that the documentation glosses over the use of $.datePicker.setDefaults when in fact it is slightly more complicated. Here is the loader function that we now use successfully:
$.ig.loader( function () { if (m_sCurrentLocale != 'en') { var oRegion = $.ig.regional[m_sCurrentLocale]; if (oRegion) { if (!oRegion.dayNamesMin) { oRegion.dayNamesMin = oRegion.dayNamesShort; } $.datepicker.regional[m_sCurrentLocale] = oRegion; $.datepicker.setDefaults($.datepicker.regional[m_sCurrentLocale]); } } } );
Where m_sCurrentLocale is set to the appropriate locale.
The first thing that has to be done is that the infragistics defaults have to be loaded into the datepicker regional settings and THEN the datepicker's defaults can be set.
In addition, you will notice the testing for dayNamesMin: these are the values that are used at top of the calendar entries and are only present for a few regions. Without these settings, the English versions will be displayed.
Once these changes are implemented, the datePicker in the grid will function as expected with regional settings.
Hello Max,
The "magic" happens because of the exclusion when the jQuery date picker widget is configured to be used with the Infragistics editors.
It is necessary to do separate setting for the datepicker’s regional settings.
Please refer to the online help:
http://help.infragistics.com/Help/NetAdvantage/jQuery/2012.1/CLR4.0/html/Using_Infragistics_Loader.html#_Ref322448594
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/i18n/jquery-ui-i18n.min.js"></script> $.ig.loader({ scriptPath: 'http://localhost/ig_ui/js/', cssPath: 'http://localhost/ig_ui/css/', resources: 'modules/i18n/regional/infragistics.ui.regional-i18n.js,igShared,igEditors,igValidator', regional:'de', locale :'bg' }); $('#validityPeriodDatepicker') .igDatePicker({ validatorOptions: getValidationOptions(), required: true, regional: 'de', width: 190, dateInputFormat: 'date' });
$.ig.loader({
scriptPath: 'http://localhost/ig_ui/js/',
cssPath: 'http://localhost/ig_ui/css/',
resources: 'modules/i18n/regional/infragistics.ui.regional-i18n.js,igShared,igEditors,igValidator',
regional:'de',
locale :'bg'
});
$('#validityPeriodDatepicker')
.igDatePicker({
validatorOptions: getValidationOptions(),
required: true,
regional: 'de',
width: 190,
dateInputFormat: 'date'
Hope this helps.