[FullCalendar Reactive] resource.setExtendedProps
Question
Forge component by André Cabral

Can anyone explain to me how to implement the  setExtendedProp() method on resources. I have followed the process through by copying how other calendar methods (updateEvent specifically) but cant figure out how to get it to work.

I am getting a "resource.setExtendedProp is not a function" error no matter how I attempt to implement it.

Please if anybody can point me to where I am getting this wrong it will be hugely appreciated.

Heres some of the code I have tried.


var calendarInstance = document.querySelector("#"+$parameters.FullCalendarId+" .fCalendar");

if(calendarInstance && !!calendarInstance.ReactiveFullcalendar){

    var Rc = calendarInstance.ReactiveFullcalendar;

    var calResource = Rc.getResourceById($parameters.ResourceId);

    var resourceJson = JSON.parse($parameters.jsonString);

    if(!!calResource){

        console.log( calResource);

     

       updateResource(calResource);

    }

}


function updateResource(resource){

    resource.setExtendedProp('score', $parameters.score);

    

     Object.entries(resourceJson).forEach(function(props){

        console.log(resourceJson.score,$parameters.score);

        

            updateProp(resource, 'score', $parameters.score);

        

    });

}


function updateProp(_resource, name, value) {

    var e = _resource;

    e.setProp(name, value);


}




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