0

i am working with full calendar and i want to apply a condition in which the appointment accepted events looking in green color and pending request appointments look in red color. How can i apply different colors to different-2 events?

Manjit Singh
  • 255
  • 5
  • 21
  • As variant you can add `status` property to your events and check it state. How you can change event bg color you can see [here](http://stackoverflow.com/a/17787268/1613335) – joni jones Aug 29 '14 at 08:03

1 Answers1

1

I'm using the callback eventRender, checking the properties for a specific string and changing the color through jQuery:

eventAfterRender: function ( event, element ) {
    console.log( event ); // Debug
    if( event.title.indexOf("Pending") > -1 ) { // if title contains "Pending"
        element.css( {'background-color': '#14B9E2', 'border': '1px solid #14B9E2'} );
    }
}
brasofilo
  • 25,496
  • 15
  • 91
  • 179