diff --git a/calendar/js/et2_widget_timegrid.js b/calendar/js/et2_widget_timegrid.js
index 30e4b83952..73ed572575 100644
--- a/calendar/js/et2_widget_timegrid.js
+++ b/calendar/js/et2_widget_timegrid.js
@@ -649,6 +649,7 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
this.scrolling
+ .css('height', (this.div.innerHeight() - header_height)+'px')
.on('scroll', jQuery.proxy(this._scroll, this));
// Percent
@@ -683,7 +684,7 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
this._top_time = 0
for(var t = 0,i = 0; t < 1440; t += granularity,++i)
{
- html += '
';
+ html += '
';
// show time for full hours, always for 45min interval and at least on every 3 row
var time = jQuery.datepicker.formatTime(
egw.preference("timeformat") === "12" ? "h:mmtt" : "HH:mm",
@@ -758,6 +759,8 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
var wd_end = 60*this.options.day_end;
var totalDisplayMinutes = wd_end - wd_start;
var rowsToDisplay = Math.ceil((totalDisplayMinutes+60)/this.options.granularity);
+ this.scrolling
+ .css('height', (this.options.height - this.gridHeader.outerHeight(true))+'px');
var new_height = this.scrolling.height() / rowsToDisplay;
this.rowHeight = new_height;
@@ -770,6 +773,7 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
'100%' :
(this.rowHeight*rows.length)+'px'
);
+ $j('.calendar_calAddEvent',this.scrolling).height(this.rowHeight);
// Scroll to start of day
this._top_time = (wd_start * this.rowHeight) / this.options.granularity;