Hello,
I would like to customize my KendoUI Calendar (with month.content template). The rendering is correct the first time, but when I call the bind method (to bind data for other controls), the calendar rendering is again running but the data.dates property is empty (in month.content property).
Can you tell me how to solve this problem (to say to the Calendar to "not bind" data)?
Thanks.
Example (display this page and press F12... all is correct... press the button "Apply Biding") :
<input type="button" id="btnTest" value="Apply Binding" />
<div id="calendar" />
window.onload = () => {
var myDates = [];
myDates.push(new Date(2014, 0, 5));
myDates.push(new Date(2014, 0, 6));
myDates.push(new Date(2014, 0, 7));
var calendarParams = {
dates: myDates,
month: {
content: '<div>' +
'#= myTrace(data) #' +
'#= data.value #' +
'</div>'
},
};
$("#calendar").kendoCalendar(calendarParams);
$("#btnTest").click(function() {
kendo.bind("body", null);
})
};
/* First time, display 3 items in the 'dates' property */
/* After binding, display 0 items in the 'dates' property */
function myTrace(data) {
console.log(data);
return "";
}
Denis
I would like to customize my KendoUI Calendar (with month.content template). The rendering is correct the first time, but when I call the bind method (to bind data for other controls), the calendar rendering is again running but the data.dates property is empty (in month.content property).
Can you tell me how to solve this problem (to say to the Calendar to "not bind" data)?
Thanks.
Example (display this page and press F12... all is correct... press the button "Apply Biding") :
<input type="button" id="btnTest" value="Apply Binding" />
<div id="calendar" />
window.onload = () => {
var myDates = [];
myDates.push(new Date(2014, 0, 5));
myDates.push(new Date(2014, 0, 6));
myDates.push(new Date(2014, 0, 7));
var calendarParams = {
dates: myDates,
month: {
content: '<div>' +
'#= myTrace(data) #' +
'#= data.value #' +
'</div>'
},
};
$("#calendar").kendoCalendar(calendarParams);
$("#btnTest").click(function() {
kendo.bind("body", null);
})
};
/* First time, display 3 items in the 'dates' property */
/* After binding, display 0 items in the 'dates' property */
function myTrace(data) {
console.log(data);
return "";
}
Denis