I'm trying to add public holidays to full calendar. http://fullcalendar.io/
var actionUrl = @Html.Raw(Json.Encode(@Url.Action("Calendar", "Lecture")));
$('#fullcalendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
eventTextColor : "Black",
eventSources: [
{
url: actionUrl,
data: function() {
return {
campusIds: getCampusIds(),
lectureRoomIds: getLectureRoomsIds(),
lecturerIds: getLecturerIds(),
eventTypeIds: getEventTypeIds(),
}
},
error: function() {
alert('there was an error while fetching events!');
},
traditional: true
},
{
url: "http://kayaposoft.com/enrico/json/v1.0/?action=getPublicHolidaysForMonth&month=1&year=2013&country=zaf?callback=?",
error: function() {
alert('there was an error while fetching events!');
},
}
],
The first event source works and that fetches json from my mvc controller. The second source however doesn't. I understand I need to use jsonp and I think I need to map the returning data over to something that full calendar understands but I can't get this right. Please assist!
Thanks