I'm attempting to add an event to FullCalendar.io using a JavaScript function.
I've tried two methods.
Triggering the function at the end of the page or by clicking.
No error is displayed, but the event isn't showing up on my calendar.
<div id='calendar'></div>
<script language="javascript">
id='13-17-1'
title='TextOK'
start= '2016-04-07T08:30:00'
end= '2016-04-07T09:30:00'
test=addCalanderEvent(id, start, end, title)
function addCalanderEvent(id, start, end, title)
{
var eventObject = {
title: title,
start: start,
end: end,
id: id
};
$('#calendar').fullCalendar('renderEvent', eventObject, true);
alert("OKOK")
}
</script>
<input type="button" onClick="addCalanderEvent('13-17-1','TITLE','2014-09-19T10:30:00','2016-04-19T10:30:00')">