1

I use react native calendar wix and firebase firestore to save events from calendar. I need to implement recurring dates (events repeat every Monday in the week). There is package https://github.com/jakubroztocil/rrule.

If I understood correctly, I need repeat events to convert into new events with rrule. I did not find an example in the documentation how save data in db an how convert data whet get data from db? When i get array of repeat events how make new array for marked events? This is marked events:

 markedDates={{
    '2012-05-16': {selected: true, marked: true, selectedColor: 'blue', repeat: true},
    '2012-05-17': {marked: true},
    '2012-05-18': {marked: true, dotColor: 'red', activeOpacity: 0, repeat: true},
 }}

This is code from rrule

const rule = new RRule({
   freq: RRule.WEEKLY,
   interval: 5,
   byweekday: [RRule.MO, RRule.FR],
   dtstart: new Date(Date.UTC(2012, 1, 1, 10, 30)),
   until: new Date(Date.UTC(2012, 12, 31))
})
Ismeet
  • 419
  • 5
  • 19
  • Did you ever get a solution to this? I'm trying to do something similar and looking for a way of dealing with date recurrence in firebase. – Anthony Jul 23 '21 at 10:27

0 Answers0