Customize / Disable delete confirmation dialog

Hi,

I would like to implement a custom dialog in order to capture certain details as to why the event is being deleted (actually I would also like to capture the same detail if the event is modified). Is there a way I can disable/replace the default “delete event confirmation dialog”?

I’m going to use a modal form for the confirmation/capture but I’m not sure as how should I pass all the parameters around.

Thanks!!!

Hello,

you can modife the delete message using scheduler.locale.confirm_deleting property:

scheduler.locale.confirm_deleting = “Your message here”;

(docs.dhtmlx.com/doku.php?id=dhtm … calization)

To not show this message at all:
scheduler.locale.confirm_deleting = null;

There is onBeforeEventDelete event that allows to get information about deleting event and deny action (if event returns false, deleting is canceled):
docs.dhtmlx.com/doku.php?id=dhtm … ventdelete

Hi Alexandra,

Thank you for your reply. I’m a bit confussed as to how to get the onBeforeDelete confirmation/cancel event. I’ve set scheduler.locale.confirm_deleting = null; since I don’t want the warning displayed. I actually introspected the scheduler’s code to figure this one out.

What I want to do is to display a custom form, I’m using jQuery Dialog for this, once the user tries to delete an event from the scheduler. If the user hit’s OK it should delete the event if the user hits cancel then it shouldn’t.

I could also work with a less “elegant” solution which would be to display the delete warning (ie. by setting scheduler.locale.confirm_deleting = “some text”) and if the user hits OK display the form, but I can’t seem to get the user’s response to the warning dialog. Am I making any sense?

Regards!

As I’ve writen before you can set onBeforeEventDelete event and execute the necessary logic here. For example:

scheduler.attachEvent(“onBeforeEventDelete”,functon(id,event){
return someYourFunction(id,event);
})

Hi Alexandra,

Thanks a lot for your reply! I managed to resolve my problem based on your advice!

Regards!

For any one reading this post, at least for 2.2 they are referring to “scheduler.locale.labels.confirm_deleting” and not “scheduler.locale.confirm_deleting”