Edit this page

views.monthHeaderTemplate String |Function

The template used to render the month slots in "month" and "year" views.

Example - monthHeaderTemplate set for "month" view

<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
  dataSource: [{
    id: 1,
    orderId: 0,
    parentId: null,
    title: "Task1",
    start: new Date("2014/6/17 9:00"),
    end: new Date("2014/7/01 11:00")
  }],
  views: [
    { type: "day"},
    { type: "week"},
    {
      type: "month",
      monthHeaderTemplate: "#=kendo.toString(start, 'MMMM, yyyy')#",
      selected: true
    }
  ]
});
</script>

Example - monthHeaderTemplate set for "year" view

<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
  dataSource: [{
    id: 1,
    orderId: 0,
    parentId: null,
    title: "Task1",
    start: new Date("2014/6/17 9:00"),
    end: new Date("2014/7/01 11:00")
  }],
  views: [
    { type: "day"},
    { type: "week"},
    { type: "month"},
    {
      type: "year",
      monthHeaderTemplate: "#=kendo.toString(start, 'MMMM, yyyy')#",
      selected: true
    }
  ]
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy