Hi,
I am currently trying to implement a highlighting feature on the scheduler where I set certain classes on elements in the scheduler when an event is being moved by the user.
This works great as long as the user does not cancel the drag operation by hitting the escape button, because then my cleanup code is not getting called. There are moveStart, move, and moveEnd event handlers available, but moveEnd is not being triggered on cancel.
After some investigation I have not found a clean way to do this. All I could come up with was 'hacking' the scheduler and checking e.slot in my moveEnd eventHandler (e.slot undefined => cancel).
Is there a clean way to do this?
kendo.ui.Scheduler.fn._movable =
function
(movable) {
return
function
() {
var
that =
this
;
movable.call(
this
);
this
._moveDraggable.bind(
'dragcancel'
,
function
() {
that.trigger(
'moveEnd'
);
});
};
}(kendo.ui.Scheduler.fn._movable);