How to disable editing RecurringApppointments for some events

4 posts, 0 answers
  1. Denis Buchwald
    Denis Buchwald avatar
    28 posts
    Member since:
    Apr 2010

    Posted 22 Feb Link to this post

    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();
        }
    }


     

  2. Plamen
    Admin
    Plamen avatar
    2734 posts

    Posted 24 Feb Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Denis Buchwald
    Denis Buchwald avatar
    28 posts
    Member since:
    Apr 2010

    Posted 24 Feb in reply to Plamen Link to this post

    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?
  5. Plamen
    Admin
    Plamen avatar
    2734 posts

    Posted 26 Feb Link to this post

    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!
     
Back to Top