We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Add custom button

Is it possible to add another button in the editor appointment dialog (save  + cancel + delete + more) ?

3 Replies

HB Hareesh Balasubramanian Syncfusion Team December 10, 2020 09:58 AM UTC

Hi Gilles, 

Greetings from Syncfusion Support..! 

We have prepared a sample based on your shared query “to add custom button in editor” using popupOpen event of the Scheduler, which can be viewed from the following link. 


  popupOpen: function(args) { 
    if (args.type === "Editor") { 
      if (flag) { 
        let dialogObj = args.element.ej2_instances[0]; 
        let buttons = dialogObj.buttons; 
        buttons.push({ 
          buttonModel: { content: "Alert", isPrimary: true }, 
          click: alert.bind(this) 
        }); 
        dialogObj.setProperties({ buttons: buttons }); 
        flag = false; 
      } 
    } 
  } 

Kindly try the above solution and get back to us if you need any further assistance. 

We will happy to assist you. 

Regards, 
Hareesh 



GI Gilles December 10, 2020 11:57 AM UTC

Thinks !
if i want to go to www.google.fr on click ?


HB Hareesh Balasubramanian Syncfusion Team December 11, 2020 02:21 PM UTC

Hi Gilles, 

Thanks for the update. 

We have modified our previously updated sample based on your shared query “if i want to go to www.google.fr on click ?” using click event of the Button component, which can be viewed from the following link. 


function alert(e) { 
  window.open("https://www.google.com/"); 
} 

Kindly try the above solution and get back to us if you need any further assistance. 

We will happy to assist you. 

Regards, 
Hareesh 


Loader.
Live Chat Icon For mobile
Up arrow icon