FullCalendar (FC) documentation states
Non-standard Fields In addition to the fields above, you may also include your own non-standard fields in each Event Object. FullCalendar will not modify or delete these fields. For example, developers often include a description field for use in callbacks such as eventRender. [Source: Event Object]
and for Google Calendar event sources
Advanced: Extended Properties Google Calendar’s API allows you to specify Extended Properties for your events. The extended properties will be available as the extendedProperties hash that is attached to each Event Object. [Source: events from Google Calendar]
However what isn't so clear is which GCal eventSource properties are classified as standard and which are non-standard.
Assuming that the properties listed on the first Event Object Doc are also applicable as standard properties for GCal eventSources means anything else is likely to be a Non-standard Field, right?
If I want to query creator fields for given FC events e.g. creator.displayName or creator.email as per Google API ref doc for events#extendedProperties which appears at the bottom of the event popup i.e. "Created by: ... " (in Google calendar that is, not FC), but I am not sure how to accomplish this.
I cannot find a complete list of Standard & Non-Standard Fields for FullCalendar (v3) GCal eventSources anywhere, never mind Docs/examples on how to access these properties.
Anyhow attempted the following:
console.log(event.extendedProperties.creator.displayName);
console.log(event.extendedProperties.creator.email);
just produced
jquery-3.3.1.min.js:2 jQuery.Deferred exception: Cannot read property 'displayName' of undefined TypeError: Cannot read property 'displayName' of undefined
And sure enough event.extendedProperties.creator did produce undefined. However next I tried:
console.log(event.extendedProperties);
console.dir(event.extendedProperties);
Which did not produce an error, but instead what appears to be an empty object
Screen shot of console.dir(event.extendedProperties)
So if it came back with nothing (i.e. empty object) it's fair to assume that there are no extendedProperties for the given events I'm querying and it also reasonable to assume that perhaps the creator fields: creator.displayName and creator.email aren't Non-standard Fields after all or at least not of the Extended Properties type.
Wait a minute, does this imply that there could be two types on Non-Standard Field lists we are dealing with or have I been staring at this screen for way too long?
Finally I attempted to double check to make sure they are not part of the event object already.
console.log(event.creator.displayName);
console.log(event.creator.email);
but again this resulted in
Uncaught TypeError: Cannot read property 'displayName' of undefined
I am at a complete loss. How am I supposed to obtain fields that aren't mentioned anywhere on the FullCalendar website nor appear to be an Extended Properties?
Have I overlooked anything or is there perhaps a list in existence of Standard/Non-standard Fields that I've somehow managed to miss?
Any ideas on how to obtain these creator fields would be much appreciated.
I don't see how any sort of code sample would be helpful here, but as I was told recently "Code is pretty much always required on Stack Overflow" so for compliance sake here's me code sample ...
<div id='calendar'></div>
<script>
$(function() {
$('#calendar').fullCalendar({
googleCalendarApiKey: '%googleCalendarApiKey%',
events: {
googleCalendarId: 'lph029pf163sce67stdgfcdpfg@group.calendar.google.com' //imdb UK
},
defaultView: 'month',
eventRender: function(event, element) {
element.popover({
animation:true,
delay: 300,
title: event.title,
content: event.description, // + req << creator.displayName/email >> e.g."Created by: imdbreleases@gmail.com"
placement: 'auto',
trigger: 'hover'
});
}
});
});
</script>
PS Didn't create CodePen as advised not to share GoogleAPIKey