This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

Expo Calendar

A library that provides an API for interacting with the device's system calendars, events, reminders, and associated records.

Android (device only)
iOS (device only)
Recommended version:
~56.0.10

expo-calendar provides an API for interacting with the device's system calendars, events, reminders, and associated records.

Additionally, it provides methods to launch the system-provided calendar UI to allow the user to view or edit events. On iOS, they present either EKEventViewController or EKEventEditViewController as a modal.

Installation

Terminal
- npx expo install expo-calendar
- yarn expo install expo-calendar
- pnpm expo install expo-calendar
- bun expo install expo-calendar

If you are installing this in an existing React Native app, make sure to install expo in your project.

Configuration in app config

You can configure expo-calendar using its built-in config plugin if you use config plugins in your project (Continuous Native Generation (CNG)). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect. If your app does not use CNG, then you'll need to manually configure the library.

Example app.json with config plugin

app.json
{ "expo": { "plugins": [ [ "expo-calendar", { "calendarPermission": "The app needs to access your calendar." } ] ] } }

Configurable properties

NameDefaultDescription
calendarPermission"Allow $(PRODUCT_NAME) to access your calendar"
Only for: 
iOS

A string to set the NSCalendarsUsageDescription permission message.

remindersPermission"Allow $(PRODUCT_NAME) to access your reminders"
Only for: 
iOS

A string to set the NSRemindersUsageDescription permission message.

writeOnlyCalendarPermission"Allow $(PRODUCT_NAME) to add events to your calendars"
Only for: 
iOS

A string to set the NSCalendarsWriteOnlyAccessUsageDescription permission message, shown when requesting write-only calendar access (iOS 17+). Only used when writeOnlyAccess is true.

writeOnlyAccessfalse
Only for: 
iOS

When true, requests write-only calendar access (iOS 17+). Sets NSCalendarsWriteOnlyAccessUsageDescription and omits NSCalendarsFullAccessUsageDescription.

Are you using this library in an existing React Native app?

If you're not using Continuous Native Generation (CNG) (you're using native ios project manually), then you need to configure following permissions in your native project:

  • For iOS, add NSCalendarsUsageDescription, NSCalendarsFullAccessUsageDescription, and NSRemindersUsageDescription to your project's ios/[app]/Info.plist:

    <key>NSCalendarsUsageDescription</key> <string>Allow $(PRODUCT_NAME) to access your calendar</string> <key>NSCalendarsFullAccessUsageDescription</key> <string>Allow $(PRODUCT_NAME) to access your calendar</string> <key>NSRemindersUsageDescription</key> <string>Allow $(PRODUCT_NAME) to access your reminders</string>

    When requesting write-only calendar access on iOS 17+, add NSCalendarsWriteOnlyAccessUsageDescription instead of NSCalendarsFullAccessUsageDescription:

    <key>NSCalendarsWriteOnlyAccessUsageDescription</key> <string>Allow $(PRODUCT_NAME) to add events to your calendars</string>

Usage

import * as Calendar from 'expo-calendar'; import { useEffect } from 'react'; import { StyleSheet, View, Text, Button } from 'react-native'; const BasicUsage = () => { useEffect(() => { (async () => { const { status } = await Calendar.requestCalendarPermissions(); if (status === 'granted') { const calendars = Calendar.getCalendars(Calendar.EntityTypes.EVENT); console.log('Here are all your calendars:'); console.log(JSON.stringify(calendars)); } })(); }, []); return ( <View style={styles.container}> <Text>Calendar Module Example</Text> <Button title="Create a new calendar" onPress={createCalendar} /> </View> ); }; async function createCalendar() { const newCalendar = await Calendar.createCalendar({ title: 'Expo Calendar', color: 'blue', entityType: Calendar.EntityTypes.EVENT, }); console.log(`Your new calendar: ${JSON.stringify(newCalendar)}`); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'space-around', }, });

API

import * as Calendar from 'expo-calendar';

Unless specified otherwise, all dates are returned in the ISO 8601 format.

No API data file found, sorry!

Permissions

Android

If you only intend to use the system-provided calendar UI, you don't need to request any permissions.

Otherwise, you must add the following permissions to your app.json inside the expo.android.permissions array.

Android permissionDescription

READ_CALENDAR

Allows an application to read the user's calendar data.

WRITE_CALENDAR

Allows an application to write the user's calendar data.

iOS

If you only intend to create events using system-provided calendar UI with createEventInCalendarAsync, you don't need to request permissions.

The following usage description keys are used by this library:

Info.plist keyDescription

NSCalendarsUsageDescription

A message that tells the user why the app is requesting access to the user’s calendar data.

NSCalendarsFullAccessUsageDescription

A message that tells the user why the app is requesting full access to the user's calendar data.

NSCalendarsWriteOnlyAccessUsageDescription

A message that tells the user why the app is requesting write-only access to the user's calendar data.

NSRemindersUsageDescription

A message that tells the user why the app is requesting access to the user’s reminders.