Override event display in full calendar

I want to override the event rendering function in the full calendar. My situation is similar to the fact that I have two js files, and in one of the parent js I create a calendar, and in the child js file I want to display events using the child js file. so is there any way to override the full calendar event from the js file for children. here is my full calendar eventRender function in parent js.

eventRender: function(event, element) { $(element).children().addClass("fc-event-inner-"+event.statusId); $(element).children().attr("id",event.id); setEventColor(element, _statusIdToEventBackgroundColor[event.statusId],_statusIdToEventFontColor[event.statusId]); createContextMenu(event.statusId); } 

and this is the code of the child file

 $(_panel).fullCalendar( 'renderEvent',loadedEvents, true); 

this function from the child file calls the function of the parent eventRender file. My calendar in the parent Js file looks like a mannequin. because I want all my events to control and link child Js files. Is it likely that I can create or use the function of the parent class (EventRender) in the child js, or how I can access it by creating an object.

Help evaluate. Thank you

+4
source share
1 answer

It looks like you can add the js function to the function event display part. Below is an example here where they add the qTip plugin to the event.

+2
source

Source: https://habr.com/ru/post/1437774/


All Articles