Collision script is using set value instead of get value

Dear Support,
Your collision script seems too be generating a before date from the scheduler’s set function, instead of its get function. As I am displaying a different value to the user as I am using in my SQL statement (as can be seen from my previous posts), this causes internal errors on the collision event. If opening the lightbox or dragging/dropping an event saved the events “get” values, rather than their “set” values, then the roll back would be more accurate. I am also unsure if this may cause any other issues in other modes, but using the get values should resolve them.
Kind regards
Greg

Dear Support,
The issue wasn’t that it was using the set value, it was that the onBeforeLightbox event in the dhtmlxscheduler_collision.js file was using a reference to the events start_date and end_date rather than assigning a value. I changed the code too as follows, and it now works as expected:

scheduler.attachEvent("onBeforeLightbox",function(id){
	var ev = scheduler.getEvent(id);
	var start_date = new Date(ev.start_date);
	var end_date = new Date(ev.end_date);
	before = [start_date, end_date];
	return true;
});

Fix similar to the above one will be included in the main codebase.
While existing logic must not cause problem for default lightbox, it can be a reason of tricky problems in case of custom date manipulations, as in your case.