I'm using angular5 and fullcalendar.io and want to have code like this, where mySelectEvent(event) is a reusable function I have defined which will manipulate the fullcalendar and can be called from multiple fullcalendar callback events.
ngOnInit() {
$('#calendar').fullCalendar({
eventClick: function(event, jsEvent, view) {
mySelectThisEvent(event);
...
};
eventResizeStart: function( event, jsEvent, ui, view ) {
mySelectThisEvent(event);
...
};
eventDargStart: function( event, jsEvent, ui, view ) {
mySelectThisEvent(event);
...
};
}
function mySelectThisEvent(event) {
<for loop deselect old event>
<select event
}
}
I have my full calendar working and doing all sorts of stuff so just asking where to put a funciton definition and how to call it from the fullcalendar callback events.