You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 28, 2019. It is now read-only.
In my application language change is dynamic, but very frequent. From what I saw in documentation jQueryUI, there are files for each language, but you need to make a javascript command that specifies the language component. The AngularUI did a treatment for this / one specific API?
Good morning, not wanting to be annoying, and forgive me if I'm being, but I really need to know how to modify the language of the ui-date. Can you help me?
Not trivial. I'm assuming you use this angular translate to handle your translations. The way I did it:
In index.html, include the languages you want to be able to display:
Then in your controller, extend $scope.dateOptions with the language you're using:
// JQuery UI date options$scope.dateOptions={minDate: 0,dateFormat: ninja_config.l10n.ui_date};angular.extend($scope.dateOptions,jQuery.datepicker.regional[$translate.uses()]);
Also add a listener to be able to change the language dynamically:
// Translates the datepicker whenever the language changes.$scope.$on('$translateChangeSuccess',function(){varlanguage=$translate.uses();$log.debug('Changing datepicker language to '+language);angular.extend($scope.dateOptions,jQuery.datepicker.regional[language]);});
In my application language change is dynamic, but very frequent. From what I saw in documentation jQueryUI, there are files for each language, but you need to make a javascript command that specifies the language component. The AngularUI did a treatment for this / one specific API?
JQuery Doc: http://api.jqueryui.com/datepicker/ look for Localization
The text was updated successfully, but these errors were encountered: