Good Morning,
I'm initializing a scheduler javascript. I have a problem when I move the data.
I was trying to create a method that would allow me to avoid overlap of events. Through a Request Daypilot on a external php file I determine if the event is overlaid on another but then, if there is overlap, I can not bring back the event to the initial position. Can you give me some help? I leave the code that I wrote.
dp.onEventMove = function (args) {
DayPilot.request(
"movePratica.php",
function(req) { // success
var response = eval("(" + req.responseText + ")");
if (response.result=='OK') {
dp.message("Resized: " + response.message);
}
else {
dp.message("Error");
args.preventDefault();
}
},
args,
function(req) { // error
dp.message("Error");
args.preventDefault();
}
);
}