Calendar Month.Content Customization and Binding

3 posts, 0 answers
  1. Denis
    Denis avatar
    7 posts
    Member since:
    Mar 2014

    Posted 31 Mar 2014 Link to this post

    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. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 02 Apr 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Denis
    Denis avatar
    7 posts
    Member since:
    Mar 2014

    Posted 02 Apr 2014 in reply to Georgi Krustev Link to this post

    Thanks very much for your anwser...
    At this moment, I'm put the $("#calendar").kendoCalendar(calendarParams) after kendo.bind (and it's working).

    Denis
Back to Top