Adding a new event with client-side immediate update
6 years ago.
I have been able to use the examples to create a new event using the backend create sample. Is there a way to use the message that is returned to immediately update the schedule without having to reload all the events?
I am creating the new event using the click on a new range code sample which calls the newcalevent modal form and then a backend create page.
dp.onTimeRangeSelected = function (args) {
var modal = new DayPilot.Modal();
modal.onClosed = function(args) {
dp.clearSelection();
var data = args.result;
if (data && data.result === "OK") {
loadEvents();
dp.message(data.message);
}
};
modal.showUrl("newcalevent.php?start=" + args. start + "&end=" + args.end + "&resource=" + args.resource + "&userid=" + '<?php echo $UserID;?>');
};
DayPilot