SaveEvent in a calendar getting deleted after viewing
See original GitHub issueI am using this package from last 1 year, i am facing issue after upgrading the react-native project to 0.59.10. When an event is created from application, save Event is returning ID and Event is saved In Phone but when i viewed in Calendar It will get deleted.
Environment
React Native Environment Info: System: OS: macOS 10.14.5 CPU: (8) x64 Intel® Core™ i7-4770HQ CPU @ 2.20GHz Memory: 1006.73 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.15.1 - /usr/local/bin/node npm: 6.4.1 - /usr/local/bin/npm SDKs: iOS SDK: Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3 Android SDK: API Levels: 23, 25, 26, 27, 28 Build Tools: 28.0.2, 28.0.3 System Images: android-23 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom IDEs: Android Studio: 3.4 AI-183.6156.11.34.5692245 Xcode: 10.3/10G8 - /usr/bin/xcodebuild npmPackages: react: 16.8.3 => 16.8.3 react-native: 0.59.10 => 0.59.10 npmGlobalPackages: react-native-cli: 2.0.1
Steps to Reproduce
Using the latest code from Master branch, I tried to add one event using below code
RNCalendarEvents.authorizationStatus().then((status)=>{
console.log('status',status)
if(status == 'authorized'){
RNCalendarEvents.saveEvent('Today evevnt', {
startDate:new Date('2019-08-07T16:00:00.0000z'),
endDate: new Date('2019-08-07T17:00:00.0000z')
}).then((data)=>{
console.log("data",data)
})
}
})
Its added successfully in Calendar, But when i open the calendar its disappear in few seconds
Expected Behavior
Event should be there always until we delete
Actual Behavior
Its disappear immediately when we open the calendar.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5
Top GitHub Comments
Hi @jitendra8288 -
I had the same problem with Android - (iOS worked fine).
The following fixed my problem:
Find the ‘primary’ calendar and ensure it allows modifications, then save to that specific calendar id
Hi @jitendra8288 , Issue got resolved by changing the date format(i.e, toIsoString()).
It helps your issue.
Thanks