| Issue 808: | Resizing container div | |
| 3 people starred this issue and may be notified of changes. | Back to list |
ifthe container div has been rezised (eg. with JavaScript), the calendar does not draw itself good again. When the width becomes a higher value, only the Sunday size with the containers width. Tested it in Firefox and Chrome
Jan 27, 2011
Project Member
#1
althaus.it
Status:
Reproducing
Feb 8, 2011
I can confirm the issue. With code:
<div id='calendar' style="width:300px"></div>
<a src="#" onclick="document.getElementById('calendar').style.width=500;">link</a>
after link is triggered, calendar is resized (header and main layout) but calendar's content remains the same as it was (looks like 'windowResize' is not triggered on current view).
I have another, similar issue related with calendar's width resize but triggered by window resize event (I'm not sure is it the same issue or should I open new one). When you increase browser's window width (manually - not via JavaScript) everything works fine, but if you decrease width, calendar is not updated to smaller size (related (internal) div's width is not reduced) but horizontal scrollbar appears.
I've found some workaround for my problem by setting width on current view on window resize event:
$('#calendar').fullCalendar('getView').setWidth(countCalWidth())
In attached example I commented my "fix" so you can see my issue when maximize window and then make it smaller. Uncomment above line to see the difference.
Feb 15, 2011
whenever you dynamically resize the calendar through javascript, you need to explicitly tell fullcalendar to readjust. you do this by calling the `render` method: http://arshaw.com/fullcalendar/docs/display/render/
Status:
Done
May 18, 2012
I'm also having this issue. I have fullcalendar placed between a (show/hide) left and right columns which can be collapsed and expanded depending on what's going on in the application. When these outer columns are collapsed or expanded, the width of the center column containing fullcalendar changes to fill the unused screen area. After the fullcalendar expands the right most column (on any view) expands and the other columns do not - leaving the right column having a giant width and the others look tiny.
May 18, 2012
I was able to fix this using the #3 comment's suggestion, but I had to call the function different than I would normally. Here's the jQuery code I used...
$('#hideLeftCol').delay(420).queue(function(fullCalendar){
$('#calendar').fullCalendar('render');
});
|
|
| ► Sign in to add a comment |