[FullCalendar Reactive] Advanced Options eventRender overwritten
fullcalendar-reactive
Reactive icon
Forge component by André Cabral
Application Type
Reactive

Hi everyone,

I want to add a gradient color on every event displaying the progress in percentage. So for example: If the event progress is on 50% I want the event background color to be 50% green on the left and 50% red on the right side.

I've searched on the internet and people are telling that it can be achieved using the eventRender function. This function can be added in the advanced options section. But this is not working for this component and the reason why is because if you add the eventRender function it will get overwritten in the FullCalendar component.

As you can see in the image above I've added the eventRender function with a console.log() containing 123 as message. But the message will never show because of the eventRender below. That piece of code gets added by the component itself.

Does anyone know how to work around this or could this be changed in the future? It would be nice if there is an option to add js code to the existing eventRender without having to modify the FullCalendar component.

Regards,

Bo

Hi Bo,

The eventRender you need to change is the one below the default date property. That's where you can customize how the event is to appear. You'll need to add your changes to the html of the div of the calendar event.

Right now I'm on mobile but I can send you an eSpace with an example of changing the display for background events, which is similar to what you need.

Regards,

Anna


Hi Anna,

If you could send me the espace with the example that would be great. That way I can check how you changed the eventRender function. Because I cannot find a way to change the function unless I change it in the FullCalendar Forge Component itself.

Regards,

Bo

Hi Bo,

Sorry for the delay. I've been looking through my eSpace and I don't have those changes in there. 

You will need to alter the component that you've downloaded from the Forge, there's no way around it, since you need to change the FullCalendar's block eventRender in the BuildOptions client action.

I've done something similar in the Traditional version of the component. I'll work on my side on the changes that you need and if I finish first I'll send you the eSapce.

Regards,

Anna

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.