BoldDeskPremium customer service software with affordable pricing: $10 for 3 agents. Try it for free.
Hi,
I would like to add custom buttons to the footer of the event editor. How can I do that?
(I found a similar question with a support answer, however I am not able to convert that solution to React TypeScript... I'm referring to https://www.syncfusion.com/forums/160475/add-custom-button.)
Thanks.
onPopupOpen(args) {
if (args.type === 'Editor') {
if (this.flag) {
let dialogObj = args.element.ej2_instances[0];
let buttons = dialogObj.buttons;
buttons.push({
buttonModel: { content: 'Alert', isPrimary: true },
click: this.alert.bind(this)
});
dialogObj.setProperties({ buttons: buttons });
this.flag = false;
}
}
} |
Is there also the possibility to add a DropDownMenu-Button and a Split-Button?
Thanks for the quick reply.
Just another thing:
I wanted to modify/use the footerTemplate of the editor, however, the following piece of code is not working, any idea?
Thanks for the quick reply, the provided solution worked.
Another question:
How can I save the modifications of the event, when using custom buttons. Is there a method of the scheduler to save the modified event? In the documentation is written to use the "popupClose" event, however the argument "data" is undefined after closing the editor dialog in the event.
(Do I really have to read each value from each input-field by using something like document.getElementById("..").value? Is there no solution to get all values from each input field, like the "normal" save button is doing?)
I've attached an example...
Thanks for the reply, the provided solutions works. However, there is another issue:
When opening the event editor a 2nd time, an error appears: Cannot read property 'className' of null.
(Just edit an appointment in the provided example, save it and open another one, then the error appears)
Thanks.
Just another thing:
Any ideas why a multiline TextBox in combination with the className="e-field" fires the following error:
Uncaught DOMException: Failed to execute 'closest' on 'Element': '.' is not a valid selector.
I'm using the following piece of code to add the multiline TextBoxComponent to my event editor template:
Hi Vinitha, thanks for your reply. Please find below my answers:
Q1) What if I don't want to have a delete-button?
Q2) Is there no other "automatic" way to fetch the data from the multiline-textbox, like for all other components? I.e. why can't we use also the "e-field" class data-fetching-method for multine-textboxes?
Thanks.