Issue 2265: maxTime events aren't rendering
Status:  ExportedToGithub
Owner: ----
Closed:  Aug 2015
Reported by bjculli...@gmail.com, Aug 29, 2014
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;

fullcalendar.png
210 KB   View   Download
fullcalendar.js
196 KB   View   Download
fullcalendar-2.1.0-beta1-2014-08-29.patch
925 bytes   Download
Nov 1, 2014
Project Member #1 adamrs...@gmail.com
if this is still an issue, can you please post a boiled-down recreation of the bug as stated here?
http://fullcalendar.io/wiki/Reporting-Bugs/

would make it a million times easier for me to debug, thanks.

if this is not longer an issue for whatever reason, please let me know. thanks
Status: Reproducing
Labels: Type-Bug
Nov 25, 2014
Project Member #2 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Done
Nov 26, 2014
#3 bjculli...@gmail.com
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.
studysauce_sample.js
30.4 KB   View   Download
Nov 26, 2014
#4 bjculli...@gmail.com
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
Project Member #5 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Reproducing
Aug 21, 2015
Project Member #6 adamrs...@gmail.com
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