O'Reilly logo

Learning Kendo UI Web Development by John Adams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Calendar Widget using MVC

The Calendar widget can also be configured through the ASP.NET MVC extension methods. To imitate the calendar we just created, you can replace the contents of your view with this code:

<h2>Calendar</h2> <style type="text/css"> .specialDay { color: white; background-color: orange; border:1px solid black; } </style> <script type="text/x-kendo-template" id="redDays"> # if ($.inArray(+data.date, data.dates) != -1) { # <div class="specialDay">#= data.value #</div> # } else { # #= data.value # # } # </script> <script type="text/javascript"> var datesArray = [+new Date(2012, 5, 15), +new Date(2012, 5, 21)]; </script> @(Html.Kendo().Calendar() .Name("mvcCalendar") .Depth(CalendarView.Month) .Max(new DateTime(2012, 6, 30)) .Min(new ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required