views.eventTimeTemplateString|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: [
      {
        isAllDay:true,
        id: 1,
        start: new Date("2013/6/6 08:00 AM"),
        end: new Date("2013/6/6 09:00 AM"),
        title: "Interview"
      },
      {
        isAllDay:false,
        id: 2,
        start: new Date("2013/6/6 09:00 AM"),
        end: new Date("2013/6/6 10:00 AM"),
        title: "Workshop"
      }
    ]
  });
</script>
In this article
views.eventTimeTemplate
Not finding the help you need?
Contact Support