I am trying to pass events into FullCalendar using json and they are not displaying. Does anyone know if there is something wrong with the structure of my json?
CFC file:
<cfcomponent>
<cfsetting showDebugOutput='No'>
<cffunction access='remote' name='getEvents' >
<cfset var events = [{'id'='10','title'='Urlaub','start'='2014-11-14 07:30:30','end'='2014-11-14 08:30:30'}]>
<cfreturn serializeJSON(events)>
</cffunction>
</cfcomponent>
CFM file:
eventSources:
[
{
url: 'events_for_calendar_test.cfc?method=getEvents',
color: 'yellow',
textColor: 'black'
}
]
JSON feed being passed:
[{"start":"2014-11-14 07:30:30","end":"2014-11-14 08:30:30","id":"10","title":"Urlaub"}]
wddxpacket was being added to the json by coldfusion serializeJSON. just had to add attributes to the function to make sure it only returned what I needed.