Search code examples
javascriptangularjsangular-ui-bootstrapangular-ui-gridangular-ui-datepicker

add traduction to ui-datepicker in angular ui-grid


is there a way to translate the button in the angular ui-datepicker in this plunker example. I tried adding close-text="{{\'lblClose\' | translate}}" current-text="{{\'lblToday\' | translate}}" clear-text="{{\'lblClear\' | translate}}" like the other Angular ui-datepicker but it's not working. any help is really apreciated


Solution

  • you can do it just by updating the directive like this <div class="datepicker-wrapper" ><input uib-datepicker-popup is-open="isOpen" ng-model="' + attrs.rowField + '" ng-change="changeDate($event)" close-text="closeText" current-text="curentText" clear-text="clearText"on-open-focus="false" disabled/></div> Please see this plunker for result