onBeforeEventChanged and New Event Conflict

I’m trying to confirm drag event change, but somehow it’s conflicting with new event. When i double click to create event, it shows me confirm window which I only need for drag n drop. Following is the code.

	  scheduler.attachEvent("onBeforeEventChanged", function(event_object, native_event, is_new){
			        //to prevent drop on past event
				if (event_object.start_date < (new Date())) {
					return false;
				else if (event_object.start_date > (new Date())) {
					var convert = scheduler.date.date_to_str("%Y-%m-%d %h:%i %a");
					var temp_start_date = convert(event_object.start_date);
					var temp_end_date = convert(event_object.end_date);
					var dialog_confirm= confirm("Do you really want to change event to "+temp_start_date+"-"+temp_end_date);
					if (dialog_confirm==true){ return true; }else { return false;}
					return true;
			return true;

I want to modal confirm window appears only for Drag n Drop not for New event creates through double click.

onBeforeEventChanged may be called for new event creation, but it will provide is_new flag as true, so you can separate new event creation from edit actions and ignore first.

It seems that you code already using such flag, is it still not help?
Can you provide some more info in which scheduler’s mode double-click result in handler call without is_new flag?

New event stop conflicting after i added scheduler._edit_stop_event(scheduler.getEvent(id),false); on cancel button. However same code keep showing confirm dialog if you press okay from confirm dialog and then click on scheduler timeline for new event. It suppose to show only if event change

Unfortunately issue can’t be reconstructed locally.

If issue still occurs for you - please provide any kind of sample or demo link where it can be reconstructed.

Actually I’m using scheduler with titanium and confirm dialog in windows OS allowing event to move with mouse even confirm dialog is open.

So I’m wondering the possibility of using jquery confirm dialog, if user drag n drop event to new slot and from jquery dialog user clicks cancel button then event get back to its previous position.

You’ve told me same for Add Event scheduler._edit_stop_event(scheduler.getEvent(temp_new_appointment_id),false); is that anything available same for dnd revert?

If you will use non modale dialogs - the only way is to lock original position of event , and if “cancel” was choused - reset properties of event back to old values

You can check sources/ext/ext_limit.js which uses similar technique to move events back after not-allowed dnd