New to Kendo UI for jQueryStart a free 30-day trial

Month

configuration

Templates for the cells rendered in the calendar "month" view.

month

Object
<div id="daterangepicker"></div>
<script>
$("#daterangepicker").kendoDateRangePicker({
    month: {
        content: (data) => `<div>${data.value}</div>`,
        empty: "<span>-</span>"
    }
});
</script>

The template to be used for rendering the cells in "month" view, which are between the min/max range.

<style>
  .exhibition{color:blue}
  .party{color:red}
</style>

<div id="daterangepicker"></div>

<script id="cell-template" type="text/x-kendo-template">
    <span class="#= data.value < 10 ? 'exhibition' : 'party' #">#= data.value #</span>
</script>

<script>
$("#daterangepicker").kendoDateRangePicker({
    month: {
       content: $("#cell-template").html()
    }
});
</script>

The template used for rendering cells in the "month" view, which are outside the min/max range.

<div id="daterangepicker1"></div>
<script>
$("#daterangepicker1").kendoDateRangePicker({
    month: {
       empty: '-'
    }
});
</script>
<div id="daterangepicker2"></div>
<script>
$("#daterangepicker2").kendoDateRangePicker({
    month: {
       empty: '<span style="color:\\#ccc;padding:0 .45em 0 .1em;">#= data.value #</span>'
    }
});
</script>

The template to be used for rendering the cells in "week" column. By default, the widget renders the calculated week of the year. The properties available in the data object are:

  • currentDate - returns the first date of the current week.
  • weekNumber - calculated week number.

These properties can be used in the template to make additional calculations.

<style>
  .italic{
    font-style: italic;
  }
</style>
<body>

<div id="daterangepicker1"></div>

<script id="week-template" type="text/x-kendo-template">
   <a class="italic">#= data.weekNumber #</a>
</script>
<script>
  $("#daterangepicker1").kendoDateRangePicker({
    weekNumber: true,
    month: {
      weekNumber: $("#week-template").html()
    }
  });
</script>