Completed
Last Updated: 31 Oct 2022 14:22 by ADMIN
Paul
Created on: 24 Oct 2022 20:27
Category: Scheduler
Type: Feature Request
2
Get the next recurrence date
It would be nice to have an event or a method that gives the next recurrence date when you open the recurrence editor or based on the recurrence rules.
1 comment
ADMIN
Martin Bechev
Posted on: 31 Oct 2022 14:22

Hi Paul,

Indeed this is currently possible using the expand method of the @progress/kendo-recurrence package. The expand method accepts two parameters - a recurrence rule and an object containing the start and end date range:

  getDate() {
    const rRule: RecurrenceRule = {
      freq: 'daily',
      start: this.getZonedDate(new Date(2000, 10, 10, 16, 30)),
      end: this.getZonedDate(new Date(2000, 10, 10, 17, 30)),
    };

    const date = expand(rRule, {
      rangeStart: this.getZonedDate(new Date(2000, 10, 10)),
      rangeEnd: this.getZonedDate(new Date(2000, 10, 12, 17, 0)),
    });

    console.log(date.events);
  }

  getZonedDate(date) {
    return ZonedDate.fromLocalDate(date, 'Etc/UTC');
  }

Here is an example:

https://stackblitz.com/edit/angular-gedgua

That is why I am going to mark this feature as 'Completed' because the requested functionality is achievable with the current API.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.