Dear,
Our users shouldn't be able to edit events which are in the past.
I've come up with the solution I added below which will give an alert. However I'm looking for a cleaner solution ... one that would make such events unclickable or would for example give a small stop sign OnHover.
Could anyone point me in the right direction as to how I would locate these events with JQuery?
Thanks in advance.
Kind regards,
Yannick
function scheduler_OnEdit(e) {
var now = new Date();
if (e.event.TaskID > 0 && e.event.end < now) {
alert("Events in the past cannot be changed.");
e.preventDefault();
}
}
Our users shouldn't be able to edit events which are in the past.
I've come up with the solution I added below which will give an alert. However I'm looking for a cleaner solution ... one that would make such events unclickable or would for example give a small stop sign OnHover.
Could anyone point me in the right direction as to how I would locate these events with JQuery?
Thanks in advance.
Kind regards,
Yannick
function scheduler_OnEdit(e) {
var now = new Date();
if (e.event.TaskID > 0 && e.event.end < now) {
alert("Events in the past cannot be changed.");
e.preventDefault();
}
}