Skip to content

nearform/react-native-calendar-manager

 
 

Repository files navigation

@nearform/react-native-calendar-manager

Note This is a fork of @shoutem/react-native-calendar-manager, with latest patches applied and with new features that will come later.

A calendar manager for React Native. Exposes methods which can be used to interact with Android or iOS device's native calendar app.

Supported React Native platforms

  • Android
  • iOS

Plugin installation

Run npm install --save @nearform/react-native-calendar-manager

Linking

We support only React Native 0.76+ and autolinking is supported by default for this module.

Permissions

On iOS, you need to manually add the following permissions to your Info.plist:

iOS < 17

<key>NSCalendarsUsageDescription</key>
<string>This app requires access to the calendar</string>

iOS >= 17

<key>NSCalendarsWriteOnlyAccessUsageDescription</key>
<string>This app requires access to the calendar and reminders</string>

On Android, you need to manually add the following to your AndroidManifest.xml

<uses-permission android:name="android.permission.READ_CALENDAR" />

Example

import CalendarManager from '@nearform/react-native-calendar-manager';

const inTenMinutes = Date.now() + 1000 * 60 * 10;
const inTwentyMinutes = Date.now() + 1000 * 60 * 10 * 2;
CalendarManager.addEvent({
  name: 'Coffee',
  location: 'Heinzelova 33',
  startTime: inTenMinutes,
  endTime: inTwentyMinutes,
})

banner

About

Nearform's fork of react-native-calendar-manager

Resources

Stars

Watchers

Forks

Languages

  • Java 56.3%
  • Objective-C 32.8%
  • JavaScript 7.0%
  • Ruby 3.9%