Replace syncfusion edit dialog box during a double click

Hi,

We have our own dialog box to edit appointments.

It works well except when you double click on the appointment, it is the syncfusion dialog box

but not our own dialog box.

How to fix this problem ?

Regards





3 Replies

SK Satheesh Kumar Balasubramanian Syncfusion Team September 3, 2021 08:42 AM UTC

Hi Gilles,

Greetings from Syncfusion support.

You can prevent our default editor on double click using popupOpen event and open your own dialog. please refer to the following UG.
https://ej2.syncfusion.com/javascript/documentation/schedule/editor-template/#how-to-prevent-the-display-of-editor-and-quick-popups

Please let us know if you need any further assistance.

Regards,
Satheesh Kumar B



GI Gilles September 7, 2021 07:51 AM UTC

Sorry but i don't want only cancel the double click action.

But cancel double click in empty cell and connect my own dialog box when user double click in appointment cell filled

Could you give me a sample code ?

Regards



BS Balasubramanian Sattanathan Syncfusion Team September 8, 2021 09:24 AM UTC

Hi Gilles, 

Thanks for the update. 

We can prevent the default editor window by providing the args.cancel as true only if the args.type is the Editor. And also you can call your own custom dialog inside it. We have prepared a sample based on your requirement which can be available from the below link.  

popupOpen: function (args) { 
  if (args.type == "Editor") { 
    args.cancel = true; 
    isCell = args.target.classList.contains("e-work-cells"); 
    var startElement = document.querySelector("#StartTime.start-time"); 
    if (!startElement.classList.contains("e-datetimepicker")) { 
      new ej.calendars.DateTimePicker( 
        { value: args.data.StartTime || new Date() }, 
        startElement 
      ); 
    } else { 
      startObj = startElement.ej2_instances[0]; 
      startObj.value = args.data.StartTime; 
      startObj.dataBind(); 
   
    var endElement = document.querySelector("#EndTime.end-time"); 
    if (!endElement.classList.contains("e-datetimepicker")) { 
      new ej.calendars.DateTimePicker( 
        { value: args.data.EndTime || new Date() }, 
        endElement 
      ); 
    } else { 
      endObj = endElement.ej2_instances[0]; 
      endObj.value = args.data.EndTime; 
      endObj.dataBind(); 
    
    dlgObj.show(); 
 

UG: 

Kindly refer to the above sample and UG links, let us know if you need further assistance. 

Regards, 
Balasubramanian S 


Loader.
Up arrow icon