is this a bug for dhtmlxscheduler?

Hi,

I have just downloaded the standard version of dhtmlxScheduler. I am playing the sample: sample_static.html and everying is fine except I add two more lines into function init()

scheduler.attachEvent(“onEventChanged”, function(event_id,event_object){alert(event_object.text);});

scheduler.attachEvent(“onBeforeEventDelete”, function(event_id,event_object){alert(event_id);});

the red cross button (delete event) does not work any more, i.e. the event can not be deleted from IE.



///////////////////////////////////

function init() {

scheduler.config.xml_date="%Y-%m-%d %H:%i";

scheduler.init(‘scheduler_here’,null,“week”);

scheduler.load("/xbop/system/dhtmlxScheduler/events.xml");

scheduler.attachEvent(“onEventChanged”, function(event_id,event_object){alert(event_object.text);});

scheduler.attachEvent(“onBeforeEventDelete”, function(event_id,event_object){alert(event_id);});

}

////////////////////////////////



Is this a bug? or I miss something.



ouyang

If you are using custom code attached to events - be sure that it ends with return true statement. In other case , default after-event behavior will be blocked

scheduler.attachEvent(“onBeforeEventDelete”, function(event_id,event_object){
alert(event_id);
return true;
});


Thanks a lot. It is working now.



 



ouyang