I'm having trouble adding a new event to fullCalendar using jQuery. I use Eclipse to develop a web interface and are not familiar with Ajax at all and without it, this does not work with my eclipse.
Everything is written inside the button.click function in jquery.
var subject = $("#txtEventName").val();
var dateStart = $("#txtDate").val();
var dateEnd = $("#txtDateEnd").val();
var allDay = $("#alldayCheckbox").val();
var events=new Array();
event = new Object();
event.title = subject;
event.start = dateStart;
event.end = dateEnd;
event.color = "blue";
event.allDay = false;
events.push(event);
$('#calendar').fullCalendar('addEventSource',events);
No errors were detected, but no event was generated. PS: I would like to stay with an array if there is no other way in jQuery.
source
share