Add custom control to open existing popup in event calendar

I have to add a new control in EventCalendar Editor. I have top open an existing page in a popup when I click on the control.


You can add a custom button to the editor like this:

eventCalendarInstance.api.on('edit-event', (obj) => {
    const detailsButton = document.createElement('button');
    detailsButton.textContent = 'Details';

    setTimeout(() => {
        const formContainer = document.querySelector('.wx-event-calendar-editor-form');

        if (formContainer) {

            detailsButton.addEventListener('click', () => {
                console.log('Button clicked!');
        } else {
            console.error('Form container not found.');
    }, 0);


.details-button {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    border-radius: 4px;

.details-button:hover {
    background-color: #0056b3;

Please see an example: DHTMLX Snippet Tool