jQuery FullCalendar: Disable scrolling in Agenda View?

cooxie picture cooxie · Apr 20, 2012 · Viewed 18.7k times · Source

How can I disable scrolling in the Agenda View (week, day mode) using the FullCalendar jQuery plug-in? In month mode everything is fine, but when I change to Week/Day mode there is a scrollbar next to my mainpage scrollbar.

Answer

Deulis picture Deulis · May 26, 2012

This was what I did in my case. The goal is to dynamically change the height, so I used the viewDisplay event in that way:

$('#calendar').fullCalendar({
    viewDisplay: function (view) {
        var h;
        if (view.name == "month") {
            h = NaN;
        }
        else {
            h = 2500;  // high enough to avoid scrollbars
        }

        $('#calendar').fullCalendar('option', 'contentHeight', h);
    }
});