i have kendo data picker display date, want have date information in french used efficient script in layout page bellow:
<script> kendo.culture("fr-fr"); </script> <script src="~/scripts/kendo/culture/kendo.fr-fr.js"></script> <script src="~/scripts/kendo/kendo.tooltip.min.js"></script> </script>
i add globalize script culture doesn’t change:
![<script type="text/javascript" src="~/scripts/globalize/globalize.js"></script> <script type="text/javascript" src="~/scripts/globalize/cultures/globalize.culture.fr-fr.js"></script>][1]
kendo datapicker image:
@chxzy here kendo datapicker
@(html.kendo().datepickerfor(m => m./****).events(e => e.open("onopen")).footer("today - #=kendo.tostring(data, 'd') #").monthtemplate("# if ($.inarray(+data.date, birthdays) != -1) { #" + "<div class=\"birthday\"></div>" + "# } #" + "#= data.value #") .htmlattributes(new { @class = "form-control" }) .culture("fr-fr") )
and here script code:
var today = new date(), birthdays = [ +new date(today.getfullyear(), today.getmonth(), 11), +new date(today.getfullyear(), today.getmonth() + 1, 6), +new date(today.getfullyear(), today.getmonth() + 1, 27), +new date(today.getfullyear(), today.getmonth() - 1, 3), +new date(today.getfullyear(), today.getmonth() - 2, 22) ]; function onopen() { var dateviewcalendar = this.dateview.calendar; if (dateviewcalendar) { dateviewcalendar.element.width(340); } };
can please try adding following datepicker js code.
$("#datepicker").kendodatepicker({ culture: "fr-fr", //.... })
edit
after reviewing kendo mvc code, can try changing folowing think manually specifying format footer fix this.
this:
.footer("today - #=kendo.tostring(data, 'd') #")
to this:
.footer("today - #=kendo.tostring(data, 'dd/mm/yyyy') #")
Comments
Post a Comment