Render custom Editor Template using popupOpen

Hi, 

I need to render a custom editor modal, which I believe I can do using the popupOpen event. I was unable to use the EditorTemplate event because I need to customize the buttons in the footer. In my onPopupOpen function, I want to return my custom editorTemplate component but nothing is happening. My editorTemplate is a react functional component that returns JSX. Can you please advise? This seems like it should be a pretty straightforward request. Thanks.

function onPopupOpen(args) {
if (args.type === 'Editor') {
args.cancel = true;
setOpen(true);

return <EditorTemplate event={event} appointment={args.data} scheduleObjRef={scheduleObjRef} open={open} setOpen={setOpen} />;
}
}

1 Reply

VR Vijay Ravi Syncfusion Team June 13, 2023 09:56 AM UTC

Hi Jessica,


Online Demo:

https://ej2.syncfusion.com/react/demos/#/bootstrap5/schedule/editor-custom-field

https://ej2.syncfusion.com/react/demos/#/bootstrap5/schedule/editor-template

UG: https://ej2.syncfusion.com/react/documentation/schedule/editor-template#customizing-event-editor-using-template


You can customize the Schedule editor window in two ways using editorTemplate property or using popupOpen event of the Schedule. Refer the above shared UG and online demo to customize the editor window using editorTemplate and popupOpen event.


Forum: https://www.syncfusion.com/forums/166742/add-custom-button-to-event-editor-in-scheduler?reply=SEA6ki


Refer the above forum to customize the buttons in the Schedule editor dialog footer area.


Regards,

Vijay Ravi


Loader.
Up arrow icon