question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fetchAllEvents does not return multi-day events started before the start date

See original GitHub issue

Hi, I’m using this code as part of a rect-native app to display calendar events in a smart mirror - I’ve successfully retrieved the events, however I notice that it does not return any events that started before the “startDate” but are still ongoing.

Really simple code of course (I’ve hard-coded the dates for the example):

RNCalendarEvents.fetchAllEvents("2017-06-08T00:00:00.000Z", "2017-06-12T00:00:00.000Z")

It returns single day events (either allDay or start and finish within the same day), events that start on one of the days, but does return any events that started before the startDate, but finish either during this given period or beyond. I’ve tried setting the events to “allDay” or specific start finish times, but does not work.

Seems pretty basic functionality so I assumed I must be doing something wrong, any ideas, or is it a bug in the code?

Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wmcmahancommented, Jun 9, 2017

Hey @zalesky, hopefully soon. I just need to make time to get both iOS and Android recurrence rules at parity. The final structure will look something like:

{
  recurrenceRule: {
    frequency: 'weekly',
    interval: 2,
    occurrence: 2,
    endDate: (new Date()).toISOString()
  }
}
1reaction
wmcmahancommented, Jun 9, 2017

Hi @alan-zetland, it sounds like you need to create recurring events in the this case. By doing so, the start date should query the recurring instance’s start date.

Ex:

RNCalendarEvents.saveEvent('Event Title', {
  startDate: '2017-06-08T00:00:00.000Z',
  endDate: '2017-06-08T00:12:00.000Z',
  recurrence: 'daily',
  // Note: "recurrenceEnd" has not been published to NPM yet,
  // but is in the master branch of this repo for iOS
  recurrenceEnd: '2017-06-09T00:00:00.000Z'
})
Read more comments on GitHub >

github_iconTop Results From Across the Web

NSPredicate for multiday-all day event - Stack Overflow
In my database i have two columns i.e. startDate and endDate and if user pressed any date in UI like 16July 2015 then...
Read more >
EventKit does not provide day of r… | Apple Developer Forums
I am using EventKit to fetch all events from the default Apple Calendar in my app. When there is a custom recurring event...
Read more >
Considerations for Using Events and Calendars in Lightning ...
You can't delete a series from an event that is edited to occur before the original start date of the series. You can...
Read more >
List events - Microsoft Graph v1.0
Use this to specify the time zone for start and end times in the response. If not specified, those time values are returned...
Read more >
Using tribe_get_events - Knowledgebase | The Events Calendar
tribe_get_events() is a neat little helper function that makes it easy to retrieve event data when building customizations.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found