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

How to disable editing RecurringApppointments for some events

3 Answers 89 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Denis Buchwald
Top achievements
Rank 1
Denis Buchwald asked on 22 Feb 2016, 06:31 PM

I need to prevent some users from modifying some recurring events but allow them to edit others based on role permissions. I've built a function that gets called on  "Edit" event but the problem is "Edit" event gets called when editing and also adding an event. I need to allow adding events but prevent editing/modifying existing recurring events. Currently scheduler_edit function prevents both editing and adding events.

Here is my stripped down scheduler_edit function:

function scheduler_edit(e) {
    if (!e.event.CanBeEdited) {
        e.preventDefault();
    }
}


 

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 24 Feb 2016, 09:19 AM
Hello,

The issue seems to be connected with Kendo Scheduler. If this case you can use  the e.event.isNew() to check f the event is new - just being added or not.

Regards,
Plamen
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Denis Buchwald
Top achievements
Rank 1
answered on 24 Feb 2016, 02:27 PM
e.event.isNew() is true when editing a current occurrence of recurring appointment and adding a new appointment. I can't use it. Is there another parameter that would let me distinguish those to cases?
0
Plamen
Telerik team
answered on 26 Feb 2016, 06:01 AM
Hi,

You can also check if the event is recurring by using the isRecurring() method of the event.

Hope this will help[ you solve the issue.

Regards,
Plamen
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
Denis Buchwald
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Denis Buchwald
Top achievements
Rank 1
Share this question
or