Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5964959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:31:37+00:00 2026-05-22T19:31:37+00:00

I am trying to feed the events section of FullCalendar with a JSON string

  • 0

I am trying to feed the events section of FullCalendar with a JSON string from a cfc. The cfc is returning data, but I cannot get the data to return in the format needed for this plugin. The calendar is not responding to the events.
What do I need to do in setting up my cfc to return the proper format.
The JSON I am getting looks like this.

[["id: 237","title: Robert Byrd - First Appt.","start: 2011-05-24 11:00:00.0","allDay: false"],["id: 238","title: Margie Hambro - First Appt.","start: 2011-05-14 08:00:00.0","allDay: false"],["id: 302","title: Judy Nichols - First Appt.","start: 2011-05-17 15:50:00.0","allDay: false"],["id: 303","title: Ben Parker - First Appt.","start: 2011-05-23 10:15:00.0","allDay: false"],["id: 304","title: Robert Lentz - First Appt.","start: 2011-05-24 11:25:00.0","allDay: false"]]

<cffunction name="getLeadAppointments" access="remote" returnformat="json" returntype="any">
<cfargument name="start" type="any" required="true" default="">
<cfargument name="end" type="any" required="true" default=""> 
<!--- Get data --->
<cfquery name="data" datasource="#VARIABLES.dsn#">
SELECT  LS.LeadSched_ID AS id, 
LTRIM(COALESCE (CM.Contact_FName, '') + ' ' + COALESCE (CM.Contact_LName, '') + ' - ' + LD.DevType_Desc) AS event,
LS.LeadSched_TargetDate AS Start, 
LS.LeadSched_ActualDate
FROM    ...
Where   convert(varchar(25), LS.LeadSched_TargetDate) BETWEEN #dateAdd("s", ARGUMENTS.start, "01/01/1970")# AND #dateAdd("s", ARGUMENTS.end, "01/01/1970")#
</cfquery>

<cfsilent>
<cfset calEvents = ArrayNew(2)>
<cfoutput query="data">
<cfset calEvents[#currentRow#][1] = 'id: #data.id#'>
<cfset calEvents[#currentRow#][2] = 'title: #data.event#'>
<cfset calEvents[#currentRow#][3] = 'start: #data.start#'>
<cfset calEvents[#currentRow#][4] = 'allDay: false'>
</cfoutput>
<cfset calData = SerializeJSON(data)>
</cfsilent>

<cfreturn calEvents>
</cffunction> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:31:38+00:00Added an answer on May 22, 2026 at 7:31 pm

    This is a guess, but I strongly suspect that your client code wants something that looks more like this:

    [{"id": "237","title": "Robert Byrd - First Appt.","start": "2011-05-24 11:00:00.0","allDay": false}, ...]
    

    Note that the entries in the outer array are changed here from arrays of strings (as you have) into objects, and that your original strings have been split into two (excepting the boolean property at the end, “allDay”, which is given the JSON native boolean false).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use FullCalendar to display my events from a JSON feed. It's
I'm trying to scrape data from an external JSON feed and store it in
I'm trying to load a json events feed into the FullCalendar jQuery plugin, however,
I am trying to use a JSON feed to render events in fullCalendar. Here
I am working on PostgreSQL and psycopg2. Trying to get feed data which is
I'm trying to use an RSS feed from my blog on the news section
I am trying to use jMonthCalendar to add some events from an XML feed
I am trying to get a json feed working for the jquery Full Calendar
I'm trying to feed data from SQL database to FLEX, using php script in
I'm trying to parse a feed with multiple events and its only returning me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.