Comments (10)
Thank you very much for your help and support!
from react-native-calendar-events.
Hey @franleplant, I believe that this is expected for Android when reading from the CalendarContract.Event table. I think that reading from the CalendarContract.Instances
would successfully find all instances from the query. The current response should return a recurrent rule that could be used to infer future dates without a pulling every instance though.
from react-native-calendar-events.
So right now I am not receiving those events from fetchAll
, what is your suggestion to fix this then?
from react-native-calendar-events.
Just to clarify, the results are all non recurring events, i.e. nothing assigned to the recurrence
key such as 'daily', 'weekly', etc?
from react-native-calendar-events.
Exactly, the recurrence
key is always the empty string and the events are all non-recurrent. Other way of putting it is that fetchAll
is not returning instances of recurrent events.
from react-native-calendar-events.
Hey @franleplant, I'm not able to reproduce this. Can you show how you are creating a recurring event and how you are fetching these events? Edit: Actually, I think I was able to reproduce by manually adding a recurring event to the calendar.
from react-native-calendar-events.
Hi! This is all the data I could gather:
This is a recurring event that happens every Wednesday (I've omitted some details for privacy reasons)
This is the code that fetches all the events for today,
tomorrow and the day past tomorrow and store them
in an array.
const events = await Promise.all([0, 1, 2]
// Calc the start and end of (today, tomorrow or the day after tomorrow) in the user's timezone
.map((i) => [moment().startOf('day').add(i, "day"), moment().endOf('day').add(i, "day")])
// Get events
.map(([start, end]) => RNCalendarEvents.fetchAllEvents(start.toISOString(), end.toISOString())))
This is what I get from that call
The event that you see on Wednesday is other, non recurring event, that in fact comes from another calendar that I'm subscribed too, so that's working fine. The only problem is for recurring events.
I hope this helps.
A simple way of reproducing this error is by:
- create a non recurring event A today
- create a recurring event B today (potentially start it yesterday so you get a future recurring event)
- run
fetchAll
for today - Only A will be present in the events Array.
Expected: A and B are returned
Actual: A is returned
from react-native-calendar-events.
Thanks @franleplant, I believe I see what the problem is. Recurring events (without an end date) cannot be found by the queries start and end date bounds. I should have a solution out for this later today. Thanks for reporting it!
from react-native-calendar-events.
Ok, i've pushed out a patch (1.3.5) for this. Hopefully this should now pull recurring events properly. Let me know if you run into any bugs. Cheers!
from react-native-calendar-events.
Glad I could help. 👍
from react-native-calendar-events.
Related Issues (20)
- Unable to save calendar event in Android. HOT 3
- Unable to use API on Android - "TypeError: null is not an object" for every API call HOT 2
- Ios Event Date Time wrong and confused HOT 1
- The application will crash when I set some items of the Recurrence rule
- Add event status property
- How to remove default 30mins reminder for event entry?
- when the next version will be released? the (long) addEvent is needed
- Error: you don't have permissions to add an event to the users calendar
- Events overlap not coming in horizontal direction
- Not able to save events to calendar in Android 13 HOT 3
- iOS 17 issues: unable to request permissions HOT 26
- Type error when updating event without startDate
- Events Saved on Wrong Calendar with No Alarm - Android HOT 1
- Ar you having write issues on Android, read this? HOT 2
- Patch for recurring events in Android HOT 1
- Problems with iOS 17 HOT 2
- Any alternatives or update plan? HOT 4
- Attendees are adding to the event
- saveCalendar doesnt appear in google calendar HOT 3
- ld: library 'RNCalendarEvents' not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-calendar-events.