How to Customize (or replace) Delete Event Confirmation Dialog?

Hello, how do you customize the delete event modal?

Screen Shot 2022-03-07 at 17.27.22.png


  • We need the title, content, & both button text to be different
  • The text & the buttons will need to be in our own defined theme styles.
  • Lastly, the confirm delete button will need to call our API in addition to deleting the event from calendar.


I couldn't find any examples to do this effectively unfortunately :(

So I could do DOM manipulation via `popupOpen` method, but that's NOT really preferred with React app, if it's not easy to customize the existing modal, is it better to just completely use a separate React modal component of our own? If so, how to do that? <Scheduler> has editor template & quick info template, but there's no delete confirmation template.



5 Replies 1 reply marked as answer

VM Vengatesh Maniraj Syncfusion Team March 10, 2022 06:58 PM UTC

Hi Shan,


We regret to let you know that we don't have template support for the delete confirmation dialog. If we want to customize it on our own, we recommend manipulating the DOM element via popupOpen event that is the only way. 


Regards,

Vengatesh 



SD Shan Du March 10, 2022 11:14 PM UTC

Thank you for the reply!

Would you guys consider adding that feature in the future? It seems like a fairly common use case imo



VM Vengatesh Maniraj Syncfusion Team March 11, 2022 12:35 PM UTC

Thanks for your valuable feedback.

But, actually, we have an option to open our customized window by disabling the default window like below. 

  onPopupOpen(args) {
    if (args.type === 'DeleteAlert') {
      args.cancel = true// disable the default delete alert
      // You can open your customized delete window here
    }
  }



Marked as answer

SD Shan Du March 14, 2022 07:25 PM UTC

Thank you Vengatesh, I used the above solution provided as an alternative work around to open our own modal & it works fine for now.

I would still suggest you guys implement a way to customize the delete confirmation modal similar to `editorTemplate` or `quickInfoTemplate`, at least the ability to customize the text would be very useful.



VM Vengatesh Maniraj Syncfusion Team March 16, 2022 05:40 PM UTC

Hi Shan,


Thanks for your valuable suggestion.

We have considered your suggestion as a feature request. We will implement this feature and rolled out in any of our upcoming releases. You can track the status of the feature through the below feature feedback.

https://www.syncfusion.com/feedback/33451/template-support-for-delete-confirmation-dialog


Regards,

Vengatesh 


Loader.
Up arrow icon