Our pure JavaScript Scheduler component


Post by tscott »

Hi, I'm trying to create a Popup within a context menu function with the code (below) and getting the error:
Uncaught ReferenceError: Popup is not defined
Do I need to include any other libraries? I'm currently only including scheduler.umd.js (V1.2.1)
eventContextMenu : {
    extraItems : [
        {
            text : 'Add Note',
            icon : 'b-fa b-fa-fw b-fa-comment',
            onItem({eventRecord}) {
                var popup = new Popup({
                    widgets : [
                        { 
                            ref : 'test',
                            type : 'text',
                            label : 'Test'
                        },
                        {
                            type : 'button',
                            cls : 'b-rasied',
                            text : 'Save',
                            onClick : () => {
                                Toast.show('>>> ' + popup.widgetMap.test.value);
                            }
                        }
                    ]
                });

                popup.show();
            }
        }
    ]
}

Post by Maxim Gorkovsky »

Hello.
If you have included umd bundle, you can refer to the popup class via namespace:
var popup = new window.bryntum.scheduler.Popup()

Post by tscott »

Thanks, that worked. :)

Post Reply