Progress events with time

122 Views Asked by At

I use fullcalendar in html, but on each events, i would like to show a progress of these event ( as change color) according to the time right now. Is it possible and how? Thank you!

1

There are 1 best solutions below

0
On BEST ANSWER

You can change the color of events defining eventAfterRender in the intialization of fullcalendar:

eventAfterRender: function (event, element, view) {
                console.log("calling eventAfterRender");

                if (event.someAttr == "someValue) {
                    element.css('background-color', 'black'); 
                    element.css('border-color', 'black');
                }

Not sure if you can change color dependin on "progress", but you can make some conditional statements inside eventAfterRender and color them according to some of the attributes of your events.