views:

285

answers:

3

I have many events on a day, and it works as expected but now looking at the month view, my calendar grid is much taller that expected. I'd like to hide some of these events from the month view, like a summary with a visual que that there are more on this day than can be shown.

I can use eventRender and return false, but i would like to know how many events are on a given day, so i can limit the rendering to about 4, then perhaps i would add an event that says " more ... "

So the question may be : how to count the events on a given date ?

or is this more like a feature request to expose a max counter for month view ?

thanks

A: 

currently not possible. see feature request: http://code.google.com/p/fullcalendar/issues/detail?id=304

arshaw
A: 

I have a similar requirement and was thinking of doing something like this:

in json feed, I would return special events that contain a count of events for each day.

Using appropriate full calendar eventRender callback, I would only display these special total count events depending on view by returning false in eventRender() for any events I don't want to see.

I haven't implemented this yet, but perhaps it can be a valid avenue. Correct me if I'm wrong.

cityspartan
A: 

I did something like this:

function(start, end, callback) {
                var viewName = $("#calendar").fullCalendar('getView');
                var startTime = Math.round(start.getTime() / 1000);
                var endTime = Math.round(end.getTime() / 1000);
                MyWebService.MyWebMethod.GetEventsByView(startTime, endTime, viewName.name,
                    function(args) {
                        callback(args);
                    },
                    function(error) {
                        var e = error;
                    }
                );
            }

Here the GetEventsByView method returns a grouped set for month view and detailed set for agendaWeek and day views. But for this to work correctly, I had to set lazyFetching:false for the calendar.

pallu