views.eventTimeTemplate String|Function

The template used by the agenda view to render the time of the scheduler events.

The fields which can be used in the template are:

  • description String - the event description
  • end Date - the event end date
  • isAllDay Boolean - if true the event is "all day"
  • resources Array - the event resources
  • start Date - the event start date
  • title String - the event title

The eventTimeTemplate option is supported when views.type is set to "agenda".

Example - set the event time template

<script id="event-time-template" type="text/x-kendo-template">
  # if (isAllDay) { #
     All day
  # } else { #
     #= kendo.toString(start, "t") # - #= kendo.toString(end, "t") #
  # }  #
</script>
<div id="scheduler"></div>
<script>
$("#scheduler").kendoScheduler({
  date: new Date("2013/6/6"),
  views: [
    {
      type: "agenda",
      eventTimeTemplate: $("#event-time-template").html(),
    }
  ],
  dataSource: [
    {
      id: 1,
      start: new Date("2013/6/6 08:00 AM"),
      end: new Date("2013/6/6 09:00 AM"),
      title: "Interview"
    }
  ]
});
</script>
In this article