Issue 476: renderEvent event syntax not clear at all...
Status:  Done
Owner: ----
Closed:  May 2010
Reported by crosenb...@gmail.com, May 5, 2010
I am running a page with datepicker, fullcalendar, and i will have a 
control box, like google calendar has for adding other calendar's to the 
current calendar display.

So I click on a link,and it will send to a cfc returning all the needed 
event data.

But I am not sure how the syntax works...Here is basically what I am 
doing..

// do ajax call
$.ajax({
	type: "POST",
	url: "/scripts/cfc/events.cfc?method=controller",
	data: dataString,
	success: function(response){

		// add ajax data to calendar events data object
		$('#calendar').fullCalendar(renderEvent,response,true);

	}
});

// re-render after they are loaded
$('#calendar').fullCalendar( 'refetchEvents' );

Then the event data comes back like this...

[
{
	id: '6A28A1D7-1AA0-919D-8D4AF508C05CCF2F',
	title: 'Road Trip!',
	allDay: 'false',
	start: '{ts '2010-05-03 13:09:57'}',
	end: '{ts '2010-05-03 13:09:57'}',
	url: 'http://blog.ttnlearning.com/road-trip/',
	className: '',
	editable: 'False',
	source: '',
},
{
	id: '6A28A1D8-1AA0-919D-8D29EBE8F8231A56',
	title: 'The floppy disk is dead.',
	allDay: 'false',
	start: '{ts '2010-04-27 21:36:27'}',
	end: '{ts '2010-04-27 21:36:27'}',
	url: 'http://blog.ttnlearning.com/the-floppy-disk-is-dead/',
	className: '',
	editable: 'False',
	source: '',
},
{
	id: '6A28A1D9-1AA0-919D-8DD29782319828EF',
	title: 'Free Lunch…',
	allDay: 'false',
	start: '{ts '2010-04-19 20:52:09'}',
	end: '{ts '2010-04-19 20:52:09'}',
	url: 'http://blog.ttnlearning.com/there-is-such-a-thing-as-free-
lunch/',
	className: '',
	editable: 'False',
	source: '',
},
{
	id: '6A28A1DA-1AA0-919D-8DB98852FAD20D25',
	title: 'Little Things Do Count',
	allDay: 'false',
	start: '{ts '2010-04-15 21:46:03'}',
	end: '{ts '2010-04-15 21:46:03'}',
	url: 'http://blog.ttnlearning.com/little-things-do-count/',
	className: '',
	editable: 'False',
	source: '',
},
{
	id: '6A28A1DB-1AA0-919D-8D35821CEB606622',
	title: 'Talking the Talk…',
	allDay: 'false',
	start: '{ts '2010-04-12 19:54:50'}',
	end: '{ts '2010-04-12 19:54:50'}',
	url: 'http://blog.ttnlearning.com/talking-the-talk/',
	className: '',
	editable: 'False',
	source: '',
},
{
	id: '6A28A1DC-1AA0-919D-8D846A07FFB95CA2',
	title: 'The Final Countdown',
	allDay: 'false',
	start: '{ts '2010-04-06 18:04:32'}',
	end: '{ts '2010-04-06 18:04:32'}',
	url: 'http://blog.ttnlearning.com/the-final-countdown/',
	className: '',
	editable: 'False',
	source: '',
},
{
	id: '6A28A1DD-1AA0-919D-8DA9DBB4508E97BB',
	title: 'No Jokes Here!',
	allDay: 'false',
	start: '{ts '2010-04-01 19:23:11'}',
	end: '{ts '2010-04-01 19:23:11'}',
	url: 'http://blog.ttnlearning.com/no-jokes-here/',
	className: '',
	editable: 'False',
	source: '',
},
{
	id: '6A28A1DE-1AA0-919D-8D421A507A4659BE',
	title: 'Social Media Stressors',
	allDay: 'false',
	start: '{ts '2010-03-29 16:35:06'}',
	end: '{ts '2010-03-29 16:35:06'}',
	url: 'http://blog.ttnlearning.com/social-media-stressors/',
	className: '',
	editable: 'False',
	source: '',
},
{
	id: '6A28A1DF-1AA0-919D-8D8B56C0E0342580',
	title: '“Complain”ments',
	allDay: 'false',
	start: '{ts '2010-03-22 16:29:33'}',
	end: '{ts '2010-03-22 16:29:33'}',
	url: 'http://blog.ttnlearning.com/complainments/',
	className: '',
	editable: 'False',
	source: '',
},
{
	id: '6A28A1E0-1AA0-919D-8D7F839AF2EF85CA',
	title: 'ROI',
	allDay: 'false',
	start: '{ts '2010-03-19 21:00:29'}',
	end: '{ts '2010-03-19 21:00:29'}',
	url: 'http://blog.ttnlearning.com/roi/',
	className: '',
	editable: 'False',
	source: '',
}]

Do I have the syntax of the coming data, wrong, or am I using the command 
wrongly?

Thank You.

May 31, 2010
Project Member #1 adamrs...@gmail.com
you are sort of doing this inside-out from the way fullcalendar normally like things. 
try doing you ajax calls in a "custom event function":
http://arshaw.com/fullcalendar/docs/event_data/events_function/
Status: Done