New to Kendo UI for jQuery? Download free 30-day trial

Prevent Adding New Events And Deleting The Exisitng Ones In Scheduler

Environment

Product Progress® Kendo UI® Scheduler for jQuery

Description

I want to allow user to edit the existing events, but I want to prevent adding new events or deleting the existing ones. How can I do that?

Solution

  1. Handle the add event of the Scheduler and prevent the default behavior.
  2. Set editable.destroy option to false.
    <div id="scheduler"></div>
    <script>
      $("#scheduler").kendoScheduler({
        date: new Date("2021/6/6"),
        startTime: new Date("2021/6/6 08:00"),
        endTime: new Date("2021/6/6 18:00"),
        editable: {
          destroy: false
        },
        add: function(e) {
          e.preventDefault();
        },
        views: [
          { type: "week" }
        ],
        dataSource: [
          {
            id: 1,
            start: new Date("2021/6/6 08:00 AM"),
            end: new Date("2021/6/6 09:00 AM"),
            title: "Interview 1"
          },
          {
            id: 2,
            start: new Date("2021/6/7 12:00 PM"),
            end: new Date("2021/6/7 1:00 PM"),
            title: "Interview 2"
          },
          {
            id: 3,
            start: new Date("2021/6/8 2:00 PM"),
            end: new Date("2021/6/8 3:00 PM"),
            title: "Interview 3"
          }
        ]
      });
    </script>

See Also

In this article