문제

I want to localize Kendo Datepicker to my culture "is-IS" but for some reason it doesn´t work correctly. This is code example:

$("#RegisterDatePicker").kendoDatePicker({
    start: "month",
    culture: "is-IS",
    value: new Date(),
    format: "dd.MMMM yyyy",
    events: {
        change: "registerDatePicker_OnChange"
    }
});

The culture seems to revert to its default localization "en-US". I know this culture should work with Datepicker because whenever I declare the Datepicker within the Razor engine it renders correctly. Here´s a code example from Razor:

@(Html.Kendo().DatePicker()
  .Name("RegisterDatePicker")
  .Start(CalendarView.Month)
  .Value(DateTime.Now)
  .Format("dd.MMMM yyyy")
  .Events(e => e.Change("registerDatePicker_OnChange"))
  .Culture("is-IS")
)

Can anyone point out whats wrong with the script declaration of my Datepicker?

도움이 되었습니까?

해결책

In order to the Kendo Globalization work correctly you need to include the correct additional culture scripts after you have included the Kendo scripts.

So in you case you need the to include the kendo.culture.is-IS.js script:

<script src="jquery.js"></script>
<script src="kendo.all.min.js"></script>
<script src="kendo.culture.is-IS.js"></script>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top