I am integrating with wordpress.
I have created a custom table that I want to save the events to. I am able to grab events from the database and have them output to the calander, using an ajax request and formatting the date using the code below
var data = [];
response.forEach(function (index) {
var startDate = parseInt(index.start_date);
startDate = (startDate * 1000);
var a = moment(startDate).format("DD/MM/YYYY HH:mm:ss");
var endDate = parseInt(index.end_date);
endDate = (endDate * 1000);
var b = moment(endDate).format("DD/MM/YYYY HH:mm:ss");
var item = {};
item.start_date = a;
item.text = index.text;
item.end_date = b;
item.color = "#FAA41C";
data.push(item);
});
schedulerInit(data);
This is working great.
The next step is for me to allow for users to dynamically create events and save that event data back to my database table, what I want is a function that posts the data via ajax but I do not know what evets / hooks are available for me to do that