Issue 867: Events missing from week and day view?
Status:  Done
Owner: ----
Closed:  Apr 2011
Reported by usmaan...@gmail.com, Mar 25, 2011
I have implemented the calender in asp.net version 1.4.11. In month view the events added can be viewed with no problem. However, in week view the events go missing from Saturday and some from Sunday. If you view in month view then switch to week view you can see everything, if I flick two weeks forwards and then two weeks back again the weekend events have disappeared again. There is some issue with events being viewed on the weekends, sometimes they appear and sometimes they decide not to. I have tested in IE, Firefox and Chrome they all give the same result?

additionally....

I don't think you can fully replicate the way I have it running without having access to my whole site and database etc. Also on my site you have to log in and be a member to view the issue. I have uploaded what I think is the relevant code. Maybe you could see something I am missing. Thanks
cal.aspx.zip
2.7 KB   Download
Mar 28, 2011
#1 goy...@gmail.com
I'm chiming in as I have noticed this issue today as well and came here looking for a fix. Here's my scenario:

I'm pulling my events from a JSON feed. My default view is agendaWeek. I allow the calendar to be switched between agendaWeek and agendaDay. When the calendar loads in agendaWeek, all events are properly displayed even as I traverse the weeks forward or backwards. When I switch to agendaDay, if there happens to be an event on today, it will show up fine. However, when I move forward or backwards, events do not render if they are not "allday" events. (All-day events always are appearing, just not timed events.)

I have double checked my JSON feed and it is valid. Also, using firebug, I see that each request comes back as a HTML Code 200 and the data is there and the events that should be rendered are being returned. I also confirmed that the event doesn't exist anywhere in the DOM, so it is not a style issue.

If I go to a specific day that I know has an event on it in agendaDay view (but it doesn't get rendered) and then switch back and forth between agendaWeek and then back to agendaDay, it is now there.
Mar 28, 2011
#2 goy...@gmail.com
In addition, I have determined that setting the lazyFetching option to false does resolve the issue. The AJAX requests are successful, just nothing gets rendered.
Apr 2, 2011
Project Member #3 adamrs...@gmail.com
 Issue 862  has been merged into this issue.
Apr 2, 2011
Project Member #4 adamrs...@gmail.com
thanks for your reports, but can you please post a working example of the bug? this is what i wrote to usman...

could you try making a "minimal" demonstration of the bug? this would mean stripping away as many things as possible in your example, including the login and maybe even the code that interfaces with the database. maybe even hardcode example events into the calendar.

basically, I can't go on a wild goose chase looking through someone's code only to find it was a problem with their [non-fullcalendar] code. hope you understand.
Summary: Events missing from week and day view?
Status: Reproducing
Apr 4, 2011
#5 usmaan...@gmail.com
Ok...I have attached the scripts for the aspx files. If you go to http://cal.qservicestesting.co.uk/cal.aspx you can see the issue. In the month view you will be able to view all the events and classes. However, if you switch to week view and go forward and backwards a few weeks. Some days the events do not show. If you look at the Saturdays this is most common. 

Please let me know when you have seen the problem as i will need to take the calender down after. Thanks 
cal.aspx.zip
2.5 KB   Download
Apr 9, 2011
Project Member #6 adamrs...@gmail.com
@usmaan, thank you very much for the live link. i've tried to figure out what is going on.

sometimes fullcalendar requests event information for an entire week, and sometimes it does it one day at a time. it depends on what view you are currently in, what view you started out on, and how for forward/backwards you move.

fullcalendar has its own algorithm for determining when new event info is needed. in future releases, i will expose this and make it more adjustable.

however, you must always give fullcalendar the events it needs for a given date range. if you don't do that, things will go haywire.

i've been inspecting the ajax requests your implementation has been making, and things don't seem to add up. for example, if you send the following data to the server:

    {start:"1302418800",end:"1303023600"}

which means Sun Apr 10 2011 00:00:00 - Sun Apr 17 2011 00:00:00, you get a bunch of data back:

    {"d":"{ \"0\":{\"id\":\"4201\",\"title\":\"Adult Videopop\",\"start\":\"2011-04-11T19:30:00\",\"end\":\"2011-04-11T20:15:00\"}...

however, if you send a subset of this timerange to the server:

    {start:"1302505200",end:"1302591600"}

which means Mon Apr 11 2011 00:00:00 - Tue Apr 12 2011 00:00:00, you get nothing back:

    {"d":"{  }"}

the "Adult Videopop" event should be in there, because it's date is Mon Apr 11 2011 19:30:00!!!

so something is definitely wrong on your server side.

@goy, if you are having problems, please double check that fullcalendar is receiving all the data is needs before further posting to this thread. thanks!
Status: Done
Apr 9, 2011
#7 ben...@gmail.com
I'm getting my events from Google Calendar, so I'm not supplying a date range, rather, shouldn't Fullcalendar be supplying the date range to google?

Well, on week view, my Saturday event does not render, and the data returned does not include that Saturday event, but when I switch to month view, the data returned includes it and the event is rendered. A switch back to week allows the event to render as well.

So it seems that Fullcalendar is not specifying the correct date range properly, don't you agree?  What else could be going on here?
Apr 11, 2011
#8 usmaan...@gmail.com
I have provided my server side code and a link to the issue. If there was a server side issue then I was wondering why would it render the correct events for a Saturday when you switch from a month view to a week view. But when you go forward two weeks and then back two weeks it will not view the events on that Saturday. 

Its the same code and query but the calender seems to decide one day when to view it and another when not too.

Could you suggest how i could change the code then if it is a issue with the way i am doing things? thanks 
Apr 18, 2011
#9 usmaan...@gmail.com
Why is this issue closed? i have not got a result from it yet??
May 8, 2011
Project Member #10 adamrs...@gmail.com
ben, not sure why your code isn't working. if you are using the gcal extension, you are right, it should handle sending the dates correctly. please post as a separate issue.

usmaan, sorry, but i do not have time to debug your asp code