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

Get the Next Scheduler Event Occurrence

Environment

Product Progress® Kendo UI® Scheduler for jQuery
Operating System Windows 10 64bit
Visual Studio Version Visual Studio 2017
Preferred Language JavaScript

Description

How can I get nextOccurrence of the Kendo UI SchedulerEvent in the Scheduler?

Solution

The following example demonstrates how to achieve the desired scenario.

    <script>
    var event = new kendo.data.SchedulerEvent({
      title: "Event1",
      start: new Date(2014, 10, 10, 10),
      end: new Date(2014, 10, 10, 11),
      recurrenceRule: "FREQ=WEEKLY"
    });

    // Add the count for the occurrences.
    event.recurrenceRule += ";COUNT=2";

    // Generate the occurrences.
    var nextOccurrence = event.expand(event.start, new Date(2999, 0, 1), "Etc/UTC")[1];

    // Log the occurrence.
    console.log(nextOccurrence);
    </script>

See Also

In this article