Created
December 14, 2014 20:16
-
-
Save EdCharbeneau/845e1c19c9429f8ac095 to your computer and use it in GitHub Desktop.
Umbraco with Telerik Scheduler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Telerik Scheduler Demo</title> | |
<!-- Use the Material Design theme --> | |
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1119/styles/kendo.common-material.min.css" /> | |
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1119/styles/kendo.material.min.css" /> | |
<script src="http://cdn.kendostatic.com/2014.3.1119/js/jquery.min.js"></script> | |
<script src="http://cdn.kendostatic.com/2014.3.1119/js/kendo.all.min.js"></script> | |
<script src="http://cdn.kendostatic.com/2014.3.1119/js/kendo.timezones.min.js"></script> | |
<script src="http://cdn.kendostatic.com/2014.3.1119/js/kendo.aspnetmvc.min.js"></script> | |
</head> | |
<body> | |
<h1>Umbraco <a href="http://demos.telerik.com/aspnet-mvc/scheduler/index">Telerik Scheduler</a> integration</h1> | |
@RenderBody() | |
<p></p> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using Kendo.Mvc.UI; | |
@using EventSchedule; | |
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage | |
@{ | |
Layout = "_Layout.cshtml"; | |
var scheduleDate = Model.Content.GetPropertyValue<DateTime>("displayDate"); | |
var events = Model.Content.Children.Select(child => new MyEvent(child)); | |
} | |
@(Html.Kendo().Scheduler<MyEvent>() | |
.Name("uSchedule") | |
.Editable(false) | |
.Date(scheduleDate) | |
.Timezone("Etc/UTC") | |
.Views(views => | |
{ | |
views.AgendaView(agenda => agenda.Selected(true)); | |
views.WeekView(wv => wv.ShowWorkHours(true)); | |
}) | |
.BindTo(@events) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment