Skip to content

Instantly share code, notes, and snippets.

@EdCharbeneau
Created December 14, 2014 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EdCharbeneau/845e1c19c9429f8ac095 to your computer and use it in GitHub Desktop.
Save EdCharbeneau/845e1c19c9429f8ac095 to your computer and use it in GitHub Desktop.
Umbraco with Telerik Scheduler
<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>
@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