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

Scheduler yearly recurring pattern for leap years

4 Answers 102 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Josip
Top achievements
Rank 1
Josip asked on 04 Feb 2016, 01:09 PM

Hello,

 I use scheduler to show my events and I have events that should be shown for each year on a specific date.

I use yearly reference rule and everything works fine until even's date is not 29th February. In that case my event get's pushed to 1st March even if current year has that date.

 The only case in which my date doesn't get pushed to 1st March is if event's date is set to 29th February of the current year.

 

Is there any way to handle this as I didn't find any info regarding leap years in the documentation?

 

Thanks.

4 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 08 Feb 2016, 10:37 AM
Hello Josip,

In general, the widget will not show the recurring event if February 29th is missing (not a leap year): Could you share the event's recurrence rule in order to test it locally? 

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Josip
Top achievements
Rank 1
answered on 10 Feb 2016, 03:13 PM
Recurrence rule used is: "FREQ=YEARLY"
0
Georgi Krustev
Telerik team
answered on 12 Feb 2016, 11:18 AM
Hello Josip,

Indeed, the recurrence engine will move the event to the next month. This is the default behavior of JavaScript Date object, which we do not modify.

The only solution in this case is to use a more specific recurrence rule:
  • recurrenceRule: "FREQ=YEARLY;BYMONTH=2;BYMONTHDAY=29"
like in the test demo:
Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Josip
Top achievements
Rank 1
answered on 12 Feb 2016, 12:36 PM
Thanks.

It's not ideal but it works. It would be nice if we could use just yearly and then specify behavior for this case.
Tags
Scheduler
Asked by
Josip
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Josip
Top achievements
Rank 1
Share this question
or