Our powerful JS Calendar component


Post by SemFA »

I am using your Calendar version 5.6.2 in combination with React. To populate the calendar I generate rrules on the server and send them together with the events to the calendar. This works fine in most cases.

I do have some recurrence rules that don't work as expected in the Calendar. I have tested them in iCal.NET and on https://jkbrzt.github.io/rrule/ (tab "RRULE string") and there they work fine. (I have tried to understand the RFC standard but it is too confusing for me) Could you give a rule that does the same and works in your calendar? Or fix your handling of recurrence rules?

My broken rules:

Every Saturday (shows every day)
FREQ=DAILY;BYDAY=SA

Every first Saturday in January/February/March (shows every first Saturday in every month)
FREQ=MONTHLY;BYDAY=1SA;BYMONTH=1,2,3

Every last day of the month (shows every month on 28th, 29th, 30th, and 31st)
FREQ=MONTHLY;BYMONTHDAY=28,29,30,31;BYSETPOS=-1

Every last day of the month in January/February/March (shows also every month on 28th, 29th, 30th, and 31st)
FREQ=MONTHLY;BYMONTHDAY=28,29,30,31;BYMONTH=1,2,3;BYSETPOS=-1


Post by Animal »

FREQ=DAILY;BYDAY=SA Just means frequency is daily. The BYDAY won't have an effect.

But you don't need ByDay for FREQ=WEEKLY if it's only for one day of teh week.

FREQ=WEEKLY will just use the day that the initiating event started at.

But it will still work with the day:

Screenshot 2024-01-10 at 14.58.37.png
Screenshot 2024-01-10 at 14.58.37.png (1.05 MiB) Viewed 513 times

Post by Animal »

As for FREQ=MONTHLY;BYDAY=1SA;BYMONTH=1,2,3, it looks like our rule parsing and/or the iterator which creates occurrences does not handle BYMONTH

It does indeed use the first Saturday of every month. I'll collect these into a tiket.

Screenshot 2024-01-10 at 15.04.51.png
Screenshot 2024-01-10 at 15.04.51.png (991.93 KiB) Viewed 507 times

Post by Animal »

Regarding FREQ=MONTHLY;BYMONTHDAY=28,29,30,31;BYSETPOS=-1, I also do not fully grok the RFC, are you not asking for both the 28, 29, 30, 31st and the last day of the month?

We do have a bug there, in that it only works for months with 31 days:

Screenshot 2024-01-10 at 15.12.11.png
Screenshot 2024-01-10 at 15.12.11.png (698.18 KiB) Viewed 505 times

Post by alex.l »

Hi SemFA,

Every Saturday (shows every day)
FREQ=DAILY;BYDAY=SA

Frequency here should be weekly, not daily.
FREQ=WEEKLY;BYDAY=SA

Every first Saturday in January/February/March (shows every first Saturday in every month)
FREQ=MONTHLY;BYDAY=1SA;BYMONTH=1,2,3

Frequency here should be yearly, not monthly.
"FREQ=YEARLY;BYDAY=SA;BYMONTH=1,2,3;BYSETPOS=1"

Same thing in last rule.

All the best,
Alex


Post by Animal »


Post by SemFA »

Thank you for your response. I will change the DAILY into WEEKLY.

About the last day of the month: I found this weird rrule for the last day on the month somewhere on the internet. After some more searching I just found another rrule that does work in your calendar: "FREQ=MONTHLY;BYMONTHDAY=-1" (but also here adding ";BYMONTH=1,2,3" doesn't work)

We also want to support the 30th day of the month with only February as exception. In the same stackoverflow page where I found that new rrule there is an answer with my original rrule. For the 30th with fallback they give "FREQ=MONTHLY;BYMONTHDAY=28,29,30;BYSETPOS=-1". In your calendar this shows every month on 28th, 29th and 30th. Do you have any idea on how to get my wanted behaviour in your calendar?

See:
https://stackoverflow.com/questions/35757778/rrule-for-repeating-monthly-on-the-31st-or-closest-day


Post by Animal »

We will investigate the iterators and fix the bugs as soon as possible.


Post Reply