文檔金喜正規買球>>telerik中文文檔>>日模板
日模板
立即下載Kendo UI for jQuery
Calendar允許您為其Month視圖定制呈現的日期。
下面的示例演示如何使用自定義模板創建日歷。
<div id="calendar"></div> <script> $("#calendar").kendoCalendar({ month: { content: '<div class="custom"><#=data.value#></div>' } }); </script>
模板將value封裝在<div> HTML元素中,下面的示例演示了傳遞給模板函數的數據對象的結構。
data = { date: date, // A date object that corresponds to the current cell. title: kendo.toString(date, "D"), value: date.getDate(), dateString: "2011/0/1" // The formatted date by using the yyyy/MM/dd format and the month is zero-based. };