wmcmahan / react-native-calendar-events

📆 React Native Module for iOS and Android Calendar Events
MIT License
906 stars 292 forks source link

Removal of a reccurent event remove all events #291

Closed rrraymonde closed 4 years ago

rrraymonde commented 4 years ago

I've created a reccurent event (eventA) with the following reccurency rule:

recurrenceRule: {
          frequency: 'daily,
          endDate: endDate.toISOString(),
},

But when I try to delete eventA using RNCalendarEvents.removeEvent(idOfEventA), it removes all the events of my calendar (eventB), not just that one. If I try to find eventB using RNCalendarEvents.findEventById(idOfEventB), I get a result, even if it really seems to be deleted from my calendar because I don't see it anymore and I don't receive the notifications before the event.

I've only tested on Android.

rlazom commented 4 years ago

I got the same problem also...

bndby commented 4 years ago

same problem too

MoOx commented 4 years ago

The removeEvent method probably need an option to choose if we want to remove all or just one. PR appreciated.

wmcmahan commented 4 years ago

There is a second argument for removeEvent that allows for the following options. You should be able to specify an exceptionDate for removing that single event date only.

MoOx commented 4 years ago

Indeed. I guess this issue can be closed if we can already handle this!