| Issue 2265: | maxTime events aren't rendering | |
| 2 people starred this issue and may be notified of changes. | Back to list |
My project StudySauce.com uses fullcalendar in a beautiful way. However, we need the ability to set the time range from 8 AM to 2 AM. Fortunately, maxTime and minTime can be used. The time slots and general appearance work perfectly!
We ran in to issues with some events that occur between 12 AM and 2 AM, they were being rendered at the minTime and the height was set to 0. I also saw cases where the event would start to render properly, but the next day it overflows in to wouldn't render. I have implemented a fix for this and would like to see it make it in to the next version. I am running version 2.1.0-beta1 so this may be fixed already. Please compare this code with the latest version.
The only change is to the computeTimeTop() function. This subtracts the slot location from 48 slots. Attached is a diff for version 2.1.0-beta1, but it needs to be integrated and retested in the latest 2.1 release.
// constrain. because minTime/maxTime might be customized
if(slatCoverage < 0)
{
slatCoverage = (24 * 3600000/this.slotDuration * this.slotDuration + time - this.minTime) / this.slotDuration;
slatCoverage = Math.max(0, slatCoverage);
slatCoverage = Math.min(this.slatEls.length, slatCoverage);
slatIndex = Math.floor(slatCoverage); // an integer index of the furthest whole slot
}
else
{
slatCoverage = Math.max(0, slatCoverage);
slatCoverage = Math.min(this.slatEls.length, slatCoverage);
slatIndex = Math.floor(slatCoverage); // an integer index of the furthest whole slot
}
slatRemainder = slatCoverage - slatIndex;
Nov 25, 2014
(No comment was entered for this change.)
Status:
Done
Nov 26, 2014
Nope. Here is the doodle you asked for. http://jsbin.com/tigoxazive/1/ Comment out the top two options min and max to see where the missing events are.
Nov 26, 2014
Or rather: http://jsbin.com/tigoxazive/1/edit?js,output I don't think your constraints are working with min and max time set: https://github.com/arshaw/fullcalendar/blob/master/dist/fullcalendar.js#L6740
Nov 26, 2014
(No comment was entered for this change.)
Status:
Reproducing
Aug 21, 2015
Discussion for this issue has moved to the following URL: https://github.com/fullcalendar/fullcalendar/issues/2530 This is because Google Code is shutting down. Apologies if you are being pestered with these notifications. This is a one-time event. Happy coding, Adam
Status:
ExportedToGithub
|
|
| ► Sign in to add a comment |
Labels: Type-Bug