This is a migrated thread and some comments may be shown as answers.

Old events should not be able to be editted.

1 Answer 30 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Kenny
Top achievements
Rank 1
Kenny asked on 12 Feb 2015, 04:39 PM
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();
        }
    }

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 16 Feb 2015, 11:48 AM
Hello Kenny,

In general, the given solution is the one that you should use. Edit prevention is done in the edit event handler of the widget. If you would like to show some visual sign that will notify the end users, then you can use a custom eventTemplate that can render the special sign. This implementation depends entirely on your preferences.

Best regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Kenny
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or