wmcmahan / react-native-calendar-events

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

Not able to set specific days in Android #367

Closed Shruthi23 closed 3 years ago

Shruthi23 commented 3 years ago

I am trying to save the event only for specific days in the calender from the application.I am using daysOfWeek prop to set events for the days specified.It is working in iOS,but not in android.

Environment

OS: macOS 11.1 CPU: (4) x64 Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz Memory: 208.42 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.15.3 - /usr/local/bin/node Yarn: Not Found npm: 6.14.9 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.0 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.6953283 Xcode: 12.3/12C33 - /usr/bin/xcodebuild Languages: Java: 15.0.1 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.2 => 0.63.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to Reproduce

setting={ startDate: moment().toISOString(), endDate: moment().toISOString(), notes:"Take"+" "+this.state.medicine+" "+ "pill", description:"Take"+" "+this.state.medicine+" "+ "pill", recurrenceRule:{ frequency:'daily', duration:null, daysOfWeek:['MO'] } } RNCalendarEvents.saveEvent("Pill reminder",setting).then(res=>{ console.log("res",res) }).catch(err=>{ console.log("err-->",err) })

Expected Behavior

The event has to be set for every monday in the calender in android

Actual Behavior

The event is set to every day in the calender in android

MoOx commented 3 years ago

Don't use frequency:'daily',. Use weekly value instead.