Modifying event colors

Note: This document is intended for developers familiar with PHP. If you have a question, please ask support.

In 1.3.1, GravityCalendar added the gravityview/calendar/events filter to modify the events array passed to FullCalendar.

Using this filter, you can loop through each event and modify its properties. You can add any properties that are available on the FullCalendar Event Object.

Changing event colors based on their type

In the example below, we'll change the color of the events based on their type. Type is a dropdown field we added to our form:

Screenshot of the form editor highlighting a dropdown field with 3 choices

Example code

The final Calendar with different event colors

Screenshot of a Calendar showing various event types with different colors

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us