How to call JavaScript in SharePoint Calendar Add Button Click event ?
1 Answer
What you could do instead is to use PreSaveAction. You need to append this to the form where you save the item, and run it like this when the form is ready:
function PreSaveAction() {
// Do work;
return shouldSaveItem;
}
For example (jQuery):
$(function() {
window.PreSaveAction = function() { return false; };
});
$('[id="Ribbon.Calendar.Events.New.NewListItem-Large"]').click(function(){...})or even override the methods directly in SP.UI.ApplicationPages.CalendarMouseHandler. But this will only tell you if the modal window were opened. You could however override the whole modal