Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by ouyang on Jul 19, 2009 18:31
open dhtmlx forum
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
Answer posted by Support on Jul 20, 2009 01:40
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;
}); 
Answer posted by ouyang on Jul 20, 2009 18:43

Thanks a lot. It is working now.

 

ouyang