pickadate Angular - Translation

Asked

Viewed 517 times

2

I’m using the Angular pickadate only it is in English, I need to leave in Portuguese, could anyone help? Follows code:

 $('.datepicker').pickadate({
     selectMonths: true, 
     selectYears: 15,
     language: 'pt-br'
  });

I put language, but it doesn’t work.

<uib-datepicker ng-model="dt" class="well-sm no_right" datepicker-options="inlineOptions" style="float:left; width: 100%;"></uib-datepicker>

Unique codes I use to load the calendar.

Calendar used: https://angular-ui.github.io/bootstrap/#/datepicker

2 answers

1

By default, Angular supports en_US locale. For other formatting you need to add . js specific to the country, so just download the file containing the translations of Datepicker.

Here’s an example I did on Plunker. In the example I added in the html header the script that contains the calendar translation and Angular changed the language.

You can find the . js file that contains the Datepicker translation in this Github

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.