CSJ
CSJ

Reputation: 2957

Customize content on jQuery fullcalendar month view

I am trying to do a summary for my android daily rom build. and the build result would be "pass" or "fail"

So I use different color and className for "pass" and "fail" events, In one day, there can be about 24 events(builds), some are "pass" events, some are "fail" events.

In the fullcalendar month view, it shows up title of all the events of the day. I'd like to customize the daily square content to be like below:

Fail:4
Pass:22

Any way to do this? Thanks a lot :-)

Upvotes: 0

Views: 1259

Answers (1)

Viktor
Viktor

Reputation: 3080

This is not easy task you want to achieve. Unfortunately, fullcalendar doesn't support event grouping by default.

You should code your own solution. If you ask me, the solution for this would be that you count the number of objects with class "pass" and with class "fail" and then create new events and in month view substitute events with grouped ones. Make sure you save all events somewhere, because when the user clicks again on week or day view, he/she should see again all the events ungrouped.

Here are couple of links that might be useful: This attribute tells you how many objects there are in current jQuery selector:

http://api.jquery.com/length/

E.g.

console.log($(".pass").length);

Other users have been trying to achieve the same functionality:

http://code.google.com/p/fullcalendar/issues/detail?id=859

I also found this answer, but haven't tested it out:

https://stackoverflow.com/a/3815877/336806

Upvotes: 1

Related Questions