Scheduler doesn't update it's layout when parent container size changes

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    34 posts
    Member since:
    Dec 2010

    Posted 20 Jan 2016 Link to this post

    We have a scheduler nested inside a div element. This div element can change its width.

     When the container div changes its width, the schedule elements no longer align correctly on the calendar.


    See this Plunker snippet for a demonstration of the problem:

    After you've pressed the "Toggle Left Bar" button, you see that "Alex's Birthday" now straddles two days.


    Is there are workaround to this problem?

    Our code base is arranged so that the parent control knows nothing about the child controls hosted within it.


  2. Vladimir Iliev
    Vladimir Iliev avatar
    2190 posts

    Posted 22 Jan 2016 Link to this post

    Hi Andrew,

    This behavior is expected as the Scheduler by default listens for layout changes in the size of the "body" element which in current case is not modified. Possible solution is to manually call the "refresh" method of the Scheduler when the Left bar expand / collapse animation is completed:

    var scheduler = $("#scheduler").getKendoScheduler();

    Vladimir Iliev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top