This is a migrated thread and some comments may be shown as answers.

Calendar Month.Content Customization and Binding

2 Answers 99 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Denis
Top achievements
Rank 1
Denis asked on 31 Mar 2014, 10:13 AM
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

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 02 Apr 2014, 07:19 AM
Hello Denis,

Thank you for drawing our attention to this issue. I confirm that it is a bug, which we will address in the next internal build due in the end of this week.
As a gratitude for your involvement I updated your Telerik points.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Denis
Top achievements
Rank 1
answered on 02 Apr 2014, 08:16 AM
Thanks very much for your anwser...
At this moment, I'm put the $("#calendar").kendoCalendar(calendarParams) after kendo.bind (and it's working).

Denis
Tags
Calendar
Asked by
Denis
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Denis
Top achievements
Rank 1
Share this question
or