My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1131: Callback for pre-process event data for rendering
4 people starred this issue and may be notified of changes. Back to list
Status:  ExportedToGithub
Owner:  ----
Closed:  Aug 2015


Sign in to add a comment
 
Reported by bcha...@gmail.com, Sep 30, 2011
I think it would be nice if there was an eventBeforeRender callback.

I would like to inspect the event, before an event div is created.

Reason:

To inspect the color property of the event and determine if the backgroundColor is readable against #fff white. If not, then I'd like to switch textColor to #000 black.

A hook into eventBeforeRender() would be nice way to do an inspection.

Also, maybe you could allow returning false from eventBeforeRender() which skip the rendering of a particular event.

Your thoughts?

As a work around, I could just modify element, but I think having a complementary eventBeforeRender() to eventAfterRender() would make sense?

Thanks,
Brian
Oct 2, 2011
Project Member #1 adamrs...@gmail.com
what you want seems like a way to post-process the event source data. you could use a custom event source function to filter your events and set the color properties of the events.

but as you said, modifying the dom element is the easiest solution to code.

i'll think about this more. i'll keep this open...
Summary: pre-process event data for rendering
Status: Discussing
Oct 2, 2011
Project Member #2 adamrs...@gmail.com
 Issue 1092  has been merged into this issue.
Aug 13, 2013
Project Member #3 adamrs...@gmail.com
(No comment was entered for this change.)
Summary: Callback for pre-process event data for rendering (was: pre-process event data for rendering)
Aug 13, 2013
Project Member #4 adamrs...@gmail.com
(No comment was entered for this change.)
Labels: -Type-Enhancement Type-Feature
Jul 3, 2014
#5 Catholic...@gmail.com
I needed this functionality as well, for two purposes: (1) so that events not rendered would not take up space in the agenda view, and (2) to have a callback to check which events are to be displayed (can vary for the same event, depending upon user selectable options), even when they are outside the currently visible area of the calendar, so that a mini-calendar (Datepicker) can be accordingly colored -- depends upon prefetching of events per  issue 1822 : https://code.google.com/p/fullcalendar/issues/detail?id=1822.

Given the need for (2), I named the callback filterEvent rather than eventBeforeRender.
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/1398

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

Powered by Google Project Hosting