Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery FullCalendar: Disable scrolling in Agenda View?

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.

like image 395
cooxie Avatar asked Apr 20 '12 03:04

cooxie


1 Answers

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);
    }
});
like image 57
Deulis Avatar answered Oct 07 '22 18:10

Deulis