Hi,
I’m trying to, well, as the title states, catch the “save” event. I’m doing this since I do need to run functions (not just validations, but different behind-the-scenes checks too) prior to saving or not-saving an event.
I’m using the ‘onDataUpdate’ event handler, and I think I’m on the right track. Somehow though, it still saves the changes made to the event. Here’s my code:
[code]$$(‘scheduler’).data.attachEvent(‘onDataUpdate’, function (id, data) {
var currEvent = $$('scheduler').getItem(id);
if (currEvent.property == 'some property') {
console.log('dont save');
return false;
}
else {
console.log('save');
return true;
}
});
[/code]
What am I doing wrong?
Thanks,
Jim