Skip to content

Weekly RRULE on 'Mo,Tu,We,Th,Fr,Sa' gets parsed as weekdays and forgets the Saturday when resaving #31

@kylebonallo

Description

@kylebonallo

Hi,

Firstly, thanks for providing a great plugin. I wanted to raise a possible issue where a Weekly recurring event gets incorrectly saved as a Weekday rrule after it is opened and resaved. It seems setting a weekly recurrence of "Mo,Tu,We,Th,Fr,Sa" matches the Weekdays recurrence rule format ("Mo,Tu,We,Th,Fr") without check for the occurence of the ",Sa", leading to the "Saturday" being lost.

From my tests this seems to happen only in the exact situation outlined above where an event is Weekly and "Mo,Tu,We,Th,Fr,Sa". Any other combination of days is not affected by this as it will not match "Mo,Tu,We,Th,Fr". I believe this is because the Weekdays rule comes before the Weekly rule here, thus matching it without checking for the Saturday on the end.

// RECURRENCE TEMPLATES (Line 41)
rtemplate: { ..., weekdays: { rrule: 'FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR', fields: [ 'rirangeoptions' ] }, weekly: { rrule: 'FREQ=WEEKLY', fields: [ 'riweeklyinterval', 'riweeklyweekdays', 'rirangeoptions' ] }, ... }

I have worked on finding a fix locally, with the intention of then forking the code and submitting a PR, but have been unable to solve the problem myself. Is anyone able to help?

Kind regards, Kyle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions