search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Display Modal Box on Event Resize

Asked by Anonymous
6 years ago.

How to display Modal Box when we resizing the event?
When I applying Javascript to EventResizeHandling and calling a function OnEventResize, then its showing errors.
And I want to show the updated values in the box after resizing the event.
My code is :

EventResizeHandling="Javascript"
OnEventResize="eventResize(e);"

function eventResize(e)
{
var modal1 = dialog();
modal.showUrl("Edit.aspx?id=" + e.value() + "&hash=<%= PageHash %>");
}

function dialog() {
var modal = new DayPilot.Modal();
modal.onClosed = function (args) {
window.console && console.log(args);
if(args.result == "OK") {
dps1.commandCallBack('refresh');
}
dps1.clearSelection();
};
return modal;
}

Comment posted by Robert
5 years ago.

I don't know if this helps but here is how I get event's related data on Event Resize :
you got the new start by : args.newStart
and the new end by : args.newEnd

This is easy to check. You need only to launch a debugger and set a breakpoint at the right place in your javascript specific code.

You got the id : args.e.data.id

Warning: the eventResize function is called by DayPilot with an argument called : args (not with an event).

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.