Hi everyone,
I have a coldfusion cfc that i call to query events between the start and end date. Here is my script:
$(document).ready(function() {
var calendar = $('#calendar').fullCalendar({
events: function(start, end, callback) {
$.ajax({
type: "GET",
url: 'cfc/forecast.cfc?method=GetForecast&returnformat=plain',
data: {
startDate: start.getDate(),
startMonth: start.getMonth(),
startYear: start.getFullYear(),
endDate: end.getDate(),
endMonth: end.getMonth(),
endYear: end.getFullYear()
},
success: function(data) {
callback(data);
}
});
}
});
});
In firebug the return data looks like this:
[
{"ID": 16, "start": "2010-01-04 00:00:00.0", "end": "", "title": "AM 2 Hours: 2 - 2"},
{"ID": 16, "start": "2010-01-04 00:00:00.0", "end": "", "title": "AM 2 Hours: 2 - 2"},
{"ID": 16, "start": "2010-01-04 00:00:00.0", "end": "", "title": "PM 2 Hours: 2 - 2"},
{"ID": 16, "start": "2010-01-04 00:00:00.0", "end": "", "title": "PM 2 Hours: 2 - 2"}
]
I'm new to Javascript, jQuery and FullCalendar so please forgive me. I know I'm missing something but can't figure out what it is. Any suggestions is much appreciated!
thanks,