Dynamically updating widget with user JSON data

I am trying to dynamically update a widget’s content after an “event” and date are selected in a popup attached to the same widget. I am currently storing all user data in an array of JSON objects that is then supposed to be displayed to the user in a template field in the parent widget. I have tried following the example found in the Webix documentation for adding JSON object to a widget, but that method did not work for me. Any help is greatly appreciated! Below is the current code I have:

//the events JSON array is located in another file
function loadCalendar(){
//Create the calendar widget
    webix.ui({
        container:"calendar",
        id: "calendar1",
        autoConfig: true,
        view:"window",
        head:{
            cols:[
                {view: "label", label: dd},
                {view:"icon", icon:"plus", popup: "add_event"},
                {view:"icon", icon:"minus"}
                ]
        },
        body: {
            view:"template",
            id: "event_space",
            template: "",
            data: events
        },
        width: "auto",
        height: "auto"
    }).show();

}

webix.ui({
    view:"popup",
    id: "add_event",
    head: "Add event",
    width:300, height:200,
    body:{
        view: "form",
        scroll:false,
        elements:[
            {view:"text", name:"event", id:"event", label:"Event: "},
            {view:"datepicker", label:"Event date:", name:"e_date", id:"e_date", stringResult:true },
            { view:"button", type:"form", value:"Add Event", click: function(){
                //This is where the parent widget's content should be updated. 
                events.push(JSON.stringify(this.getParentView().getValues(),0,1));
                window.alert(events);
                $$('add_event').hide();

            }}
        ]
    }
});

Hello,

As far as I can see, you can use Webix List to display the list of events: http://webix.com/snippet/e6d44ee1

Truthfully I had no idea a list view was a thing! So it is possible then to remove an item from the list view given, for example, the event name and date?

You can remove List items by their ID.

For instance, you can switch on selection for List and then, on clicking the “-” icon, remove the currently selected list item: http://webix.com/snippet/0a9f03d9

That’s amazing! Webix keeps finding a new way to surprise me every time. Thank you!