Starting from Webix 8.0 the widget is deprecated. Use a more powerful alternative - the Scheduler.
Scheduler data are loaded via parse or load methods. If you need to add a single event you can use the add method and pass event object in it:
$$("scheduler").add(
{
id:3,
start_date:"2015-06-01 09:00:00",
end_date:"2015-06-01 10:00:00",
text:"Meeting"
}
);
Use the remove method to remove an event by its id:
$$("scheduler").remove(eventid);
To change event properties you need to do the following:
var event = $$("scheduler").getItem(eventId);
event.text = "Meeting";
$$("scheduler").refresh(eventId);
You can use the hide method to hide a certain view in Scheduler. Here you may find details about Scheduler structure.
For example, if you want to hide the "add" button, you can do the following:
$$("scheduler").$$("add").hide();
When an event is chosen in one of the lists, Scheduler fires the "onBeforeEventShow" event. If this event returns false, a form with event details won't be shown:
$$("scheduler").attachEvent("onBeforeEventShow",function(eventId){
// your code
return true;
});
Back to top