indrimuska / angular-moment-picker

Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
http://indrimuska.github.io/angular-moment-picker/
MIT License
525 stars 227 forks source link

moment-picker localization #275

Open Coul92 opened 5 years ago

Coul92 commented 5 years ago

moment-picker cannot locale if $scope.from = moment(new Date().toISOString()); passed as attribute value moment-picker="from" It sets an English as localization and ignoring locale attribute: moment-picker="from" locale="uk" Only if I set $scope.from = moment(new Date().toISOString()).locale("ru"); it helps, but I cannot do this, because I set already locale to all of my moment-pickers via momentPickerProvider: app.config(['momentPickerProvider', function (momentPickerProvider) { momentPickerProvider.options({ locale: 'uk' }); }]);