Hi,
Is there any event that occurs when it modify only the event text ?
I would like to intercept a client side event when the i click on the green check.
I’ve tried with OnEventSave but don’t works.
Thank you,
Lorenzo
Hi,
Is there any event that occurs when it modify only the event text ?
I would like to intercept a client side event when the i click on the green check.
I’ve tried with OnEventSave but don’t works.
Thank you,
Lorenzo
onEventSave is for lightbox only.
You can use onEventChanged. If you want to catch it earlier - you can redefine click handler as
scheduler._click.save = function(){
... custom code ...
scheduler.editStop(true); //default saving logic
};
Thank for your response.
Is it possible to stop the event for prevent the data saving ?
Hello,
scheduler.editStop(false);
will cancel editing and prevent saving
Sorry, I’ve tried but seems doesn’t works.
This is my code :
scheduler.attachEvent("onEventChanged", function(event_id,event_object){
var r=confirm("my question?");
if (r==true)
{
...some code....
}
else
scheduler.editStop(false);
});
How can I do ?
Thansk,
Lorenzo
Hi,
onEventChanged triggers after the changes are applied, you may override save button click handler: scheduler._click.buttons.save = function(){
var r=confirm("my question?");
if (r==true)
{
scheduler.editStop(true);
}
else
scheduler.editStop(false);
};
Thank you! It works perfectly!
Now I would to get the value of some field when I override the click handler.
I tried with
scheduler.formSection('client').getValue()
but don’t works.
I would also like set the value of mydata key (in OnEventSave I use data.mydata=‘abc’) but I don’t find any solution.
Thanks for your help.
Lorenzo
formSection API works only for lightbox, here you can use
scheduler._editor.value
and for extra data settings
var id = scheduler.getState().editor_id;
scheduler.getEvent(id).mydata = 'abc';