简体   繁体   中英

How can I change date-picker language

I have a date-picker

<input type="text" ng-readonly="true" class="form-control"
       datepicker-popup="yyyy-MM-dd" ng-model="filter.FInicial"
       is-open="filter.controlFInicialAbierto" 
       min-date="minDateIni" max-date="maxDateIni" 
       datepicker-options="dateOptions"
       ng-change="setNewEndDate()"
       date-disabled="disabled(date, mode)"
       ng-required="true"
       close-text="@ReporteAccesosRNECRESX.CerrarCalendar"
       clear-text="@ReporteAccesosRNECRESX.LimpiarCalendar"
       current-text="@ReporteAccesosRNECRESX.ActualCalendar" />

在此处输入图片说明

The months appears in English and I would like using Resources change this, How can I send the name of the months to my date-picker depends on what language I'm currently using

NOTE: the current-text "HOY" works and change the language exactly that I want because I send a resource to my date-picker (current-text="@ReporteAccesosRNECRESX.ActualCalendar"), I would like to do same with the months. I'm using angularjs .net framework 4.5

Add a localized js file (matching version of your angular js) in the header of your page After angular.js An example would be :

<script src="angular.js"></script>
<script src="angular-locale_es-es.js"></script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM