Hello,
I’m trying to ask for confirmation before deleting an event using the Modal function.
Right now I accomplish the confirmation with:
onEventDelete: async (args) => {
if(!confirm("Are you sure you want to delete this event?")){
args.preventDefault();
}
}
But when I try it with a Modal function, it doesn’t work.
onEventDelete: async (args) => {
const dlt = await DayPilot.Modal.confirm("Are you sure you want to delete this event?");
if(dlt.canceled){
args.preventDefault();
}
}