collective / collective/jquery.recurrenceinput.js
Weekly RRULE on 'Mo,Tu,We,Th,Fr,Sa' gets parsed as weekdays and forgets the Saturday when resaving
- Dominant language
- JavaScript
- Stars
- 175
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.