Issue 926: slotHeight may not be calculated optimall
Status:  Done
Owner: ----
Closed:  May 2011
Reported by kullmann...@gmail.com, Apr 21, 2011
Description:

MAY BE RELATED TO  ISSUE 784 .

In my calendar I used the CSS selector:

.fc-agenda-body tr { height: 25px }

to set the slot height. When clicking a timeslot on the calendar, events were not rendered in the correct space. Clicking 12AM rendered 12AM, but clicking 10AM would render 1230PM (see attachments.)

I noticed that in the fullcalendar.js file the slotHeight was set to:

                slotHeight = body.find('tr:first div').height() + 1;

But was then used to calculate where you clicked based on a click on a TR, not on the div which was contained. The default height for the div selected by body.find('tr:first div') is set in fullcalendar.css which was 20px (so the div was smaller than the containing TR).

Proposed solution:

I didn't thoroughly test this but you could just get the height of the TR instead. In my case I left the fullcalendar.js file in tact and I updated the height of the div and put a note in my CSS file.

1230 am.png
544 KB   View   Download
10am.png
583 KB   View   Download
Apr 21, 2011
#1 kullmann...@gmail.com
Also, what do you want off your wish list?
May 8, 2011
Project Member #2 adamrs...@gmail.com
yeah, fullcalendar relies on the inner div determining the height, not the tr itself (done this way to avoid certain browser bugs).

you need to write your css statement to set the height of the inner div.
(the particular css depends on which version of fc you are using)

hope this helps
Status: Done
May 9, 2011
#3 kullmann...@gmail.com
Aaron:

"Done this way to avoid certain browser bugs"

Ahh I see, I did not realize that.

"you need to write your css statement to set the height of the inner div."

Yes, that was the solution I used and I added a note to our CSS overrides about this for other devs.

Another easy feature to add would to be checking to see if these values were different on calendar instantiation. If they are different and the calendar is clickable you are going to have issues so you could produce an error message.