Page 1 of 1

Fullcalendar onDayClick's resource param is always undefined

PostPosted: Wed Jul 27, 2022 6:45 pm
by brady
I'm using the fullcalendar component version 2.0.0, which the documentation link here says corresponds to fullcalendar version 3.8.2. I am also using the timelineWeek view for the calendar with resources, which is supposed to allow the onDayClick to use resource as the fourth param.

The onDayClick event has the following function definition:
Code: Select all
/**
* @param {Date} date
* @param {JSEvent} event
* @param {CustomType<svy-fullcalendar.ViewType>} view
* @param {CustomType<svy-fullcalendar.ResourceType>} [resource]
* @properties={typeid:24,uuid:"1749BEE4-2734-4632-811E-B8817C74AEA6"}
*/
function onDayClick(date, event, view, resource) {
   forms.el_dispatch_calendar_jobs_popup.setDate(date);
   forms.el_dispatch_calendar_jobs_popup.show('Assign Job', 1100, 400);
   // Set the vehicle lookup date back to today, so that later the scheduler doesn't try to use the
   // date that was just clicked on the Calendar.
   forms.el_vehicle_lookup.setVehicleLookupDate(new Date());
   initCalendar(date, null);   // runs after the popup exits
}


Unfortunately, the resource param is never given a value (debugger always says "undefined").

Re: Fullcalendar onDayClick's resource param is always undef

PostPosted: Fri Jul 29, 2022 11:02 pm
by brady
I went to https://github.com/Servoy/fullcalendarcomponent, downloaded the code as a zip, and created a zip for just the fullcalendarcomponent folder. I imported the zip in servoy and it seems to have fixed the issue. The resource is showing, I haven't done any testing but it all seems good.