Hey guys,
I'm trying to customize FullCalendar's default display on the calendar month view but without much success.
I was advised to look at Event Render Hooks.
I tried adding simple content text before the title using the "extra" field on the Event structure when creating the event but nothing changed.
Also tried using the calendar AdvancedOptions and passing the eventRender function but also the calendar is not returning anything new.
For example:
eventRender: function(info) {
console.log('event render: ', info);
}
does not console log anything.
I am using the calendar from the FullCalendarReactiveSample oml file you share.
How can I change the event on the calendar so I can add html formatting to specific text (ex: Appointment - Nutrition, or Meeting - Project Grooming) or eventually create a new display of the event in the calendar?
P.S. - I need the event description to be visible
Hi Mario,
If I understood correctly, I guess this is what you are trying for?
To get the description property value:
e.event._def.extendedProps.description
EventRender Function definition:
I have also defined the CSS style class for description in the stylesheet:
.evt-desc-style { background-color: green; }
Demo screen: FC_Event Description
Refer to the attached oml
I hope this helps you!
Kind regards,
Benjith Sam
Refer to this post with same discussion: https://www.outsystems.com/forums/discussion/76908/advanced-options-eventrender-overwritten/#Post334005
Note: Make sure you set the FullCalendar Block's EventDescription property value to NeverShow as highlighted below to make it work.
Hey Benjith,
Thanks for answering. I saw that post, thus putting the P.S. part in the end of my question.I really need the description to show on events in the calendar.
There's a "special kind of event" on my project that requires the layout to be slightly different and that's where I need to have a different visualization.
Thanks Benjith this helps and I believe I can cook something up from it.
Just one more question, for the sake of sharing knowledge.
If someone wants to implement Event Render Hooks (https://fullcalendar.io/docs/event-render-hooks)
Where should the code be applied?
Thanks alot.
Hi Mário!
From what I'm seeing, Event Render Hooks are only available from version 5 of FullCalendar. The current version that is implemented is version 4, so currently I believe there is no way to use this feature.
But we are planning on updating the component (I just don't have dates yet), so should become available once update is made.
Cheers!