views.eventTemplate String|Function

The template used by the view to render the scheduler events.

The fields which can be used in the template are:

  • description String - the event description
  • end Date - the event end date
  • resources Array - the event resources
  • start Date - the event start date
  • title String - the event title

Example - set the event template

<script id="event-template" type="text/x-kendo-template">
  <div>Title: #: title #</div>
  <div>Atendees:
      # for (var i = 0; i < resources.length; i++) { #
        #: resources[i].text #
      # } #
  </div>
</script>
<div id="scheduler"></div>
<script>
$("#scheduler").kendoScheduler({
  date: new Date("2013/6/6"),
  views: [
    {
      type: "day",
      eventTemplate: $("#event-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",
      atendees: [1,2]
    }
  ],
  resources: [
    {
      field: "atendees",
      dataSource: [
       { value: 1, text: "Alex" },
       { value: 2, text: "Bob" }
      ],
      multiple: true
    }
  ]
});
</script>
In this article