Hello- I'm using daypilot pro, scheduler. I have an active area set up for deleting events, however for some reason the function is not triggered by pressing the delete icon. It gets removed from the display, but when i reload it comes back.
I have set the following before calling dp.init():
dp.eventDeleteHandling = "Update";
dp.onEventDelete = function(args) {
if (!confirm("Are you sure you wish delete this event?")) {
args.preventDefault();
}
};
dp.onEventDeleted = function (args) {
DayPilot.request("events_delete.php",
function(req) { // success
var response = eval("(" + req.responseText + ")");
if (response && response.result) {
dp.message("Deleted: " + response.message);
}
},
args,
function(req) { // error
dp.message("Delete failed");
}
);
};
events_delete.php removes the event from the DB table. I currently use the same idea for moving, creating and resizing events and they work fine.
Clearly, i'm doing something wrong, and any help would be much appreciated.
Thanks!
Dave