wmcmahan / react-native-calendar-events

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

The application will crash when I set some items of the Recurrence rule #420

Open SnowGuest opened 1 year ago

SnowGuest commented 1 year ago

As the title says the app crashes when I set the Recurrence rule

Environment

System: OS: Windows 10 10.0.19045 CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz Memory: 2.17 GB / 15.88 GB Binaries: Node: 16.18.0 - ~\AppData\Local\Temp\yarn--1670469203477-0.8827752405296665\node.CMD Yarn: 1.22.19 - ~\AppData\Local\Temp\yarn--1670469203477-0.8827752405296665\yarn.CMD npm: 8.19.2 - D:\node\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: 25, 27, 28, 29, 33 Build Tools: 28.0.3, 29.0.2, 33.0.0 System Images: android-29 | Intel x86 Atom_64, android-33 | Google APIs Intel x86 Atom_64 Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: AI-213.7172.25.2113.9123335 Visual Studio: Not Found Languages: Java: 1.8.0_351 Python: 3.11.0 npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: ^0.63.5 => 0.63.5 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Steps to Reproduce

    let flag = await RNCalendarEvents.checkPermissions();
    if (['denied', 'restricted', 'undetermined'].includes(flag)) {
      flag = await RNCalendarEvents.requestPermissions(true);
      if (['denied', 'restricted', 'undetermined'].includes(flag)) {

return } return }

const dayId = await RNCalendarEvents.saveEvent('瑞智生活App签到', {
          startDate: `${2022}-${12}-${9}T00:30:00.000Z`,
          endDate: `${2022}-${12 }-$31}T15:59:59.000Z`,
          alarms: [
            {
              date: 10,
            },
          ],

          recurrenceRule: {
              endDate:  `${2022}-${12 }-$31}T15:59:59.000Z`,
            frequency: 'daily',
            occurrence: 1,
            interval: 1,
          },
        });

Expected Behavior

I hope that the calendar event can be added successfully, and the recurrence rule of the calendar can take effect successfully