Fullcalendar onDayClick's resource param is always undefined

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Fullcalendar onDayClick's resource param is always undefined

Postby brady » Wed Jul 27, 2022 6:45 pm

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").
brady
 
Posts: 2
Joined: Thu Jul 14, 2022 5:29 pm

Re: Fullcalendar onDayClick's resource param is always undef

Postby brady » Fri Jul 29, 2022 11:02 pm

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.
brady
 
Posts: 2
Joined: Thu Jul 14, 2022 5:29 pm


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 8 guests

cron