angular-datepicker icon indicating copy to clipboard operation
angular-datepicker copied to clipboard

Not possible to localize the language

Open everflux opened this issue 11 years ago • 2 comments

It seems it is not possible to configure the locale for displaying the month and other labels. I checked the guide http://amsul.ca/pickadate.js/date.htm#translations but it did not work with the angular version.

everflux avatar Nov 30 '14 21:11 everflux

I got it to work like this (replace the german localization with anything you like):

<input type="text" 
pick-a-date="date" 
placeholder="Bitte ein Datum auswählen" 
pick-a-date-options="{
monthsFull: [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ],
monthsShort: [ 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez' ],
weekdaysFull: [ 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ],
weekdaysShort: [ 'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ],
today: 'Heute',
clear: 'Löschen',
firstDay: 1,
format: 'dddd, dd. mmmm yyyy',
formatSubmit: 'yyyy/mm/dd'
}"/>

koop-bremen avatar Jan 04 '15 14:01 koop-bremen

<input type="text" pick-a-date="dpOpts" />

$scope.dpOpts = angular.extend({},/*some global options,localization options ....*/,/*custom options*/);

hafeyang avatar Apr 02 '15 06:04 hafeyang