百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-native-add-calendar-event

> 前端框架
开源

使用标准的 iOS/Android 对话框在 React Native 中创建、查看或编辑事件

358 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

使用标准的 iOS/Android 对话框在 React Native 中创建、查看或编辑事件

Maintenance notice

[!IMPORTANT] This package has been deprecated in favor of expo-calendar which provides the features of this package (and more) and does so in a better way. Please use the package provided by Expo. Thank you.

react-native-add-calendar-event

This package alows you to start an activity (Android) or show a modal window (iOS) for adding, viewing or editing events in device's calendar. Through a promise, you can find out if a new event was added and get its ID, or if it was removed.

For managing calendar events without the UI for user to interact with, see react-native-calendar-events.

Getting started

npm install react-native-add-calendar-event --save

or

yarn add react-native-add-calendar-event

Permissions

You'll also need to install and setup react-native-permissions, or similar, to request calendar permissions for your app.

Expo Support

This package is not available in the Expo Go app. Learn how you can use it with custom dev clients.

Mostly automatic installation

  1. (only RN = 0.60) run pod install in the ios folder

  2. add NSCalendarsWriteOnlyAccessUsageDescription or NSCalendarsFullAccessUsageDescription (for edit/view access) to your Info.plist file. The string value associated with the key will be used when asking user for calendar permission.

  3. rebuild your project

iOS note for RN { if (result !== Permissions.RESULTS.GRANTED) { throw new Error(No permission: ${result}); } return AddCalendarEvent.presentEventCreatingDialog(eventConfig) }) .then((eventInfo: { calendarItemIdentifier: string, eventIdentifier: string }) => { // handle success - receives an object with calendarItemIdentifier and eventIdentifier keys, both of type string. // These are two different identifiers on iOS. // On Android, where they are both equal and represent the event id, also strings. // when { action: 'CANCELED' } is returned, the dialog was dismissed console.warn(JSON.stringify(eventInfo)); }) .catch((error: string) => { // handle error such as when user rejected permissions console.warn(error); });

…

navigationBarIOS: { tintColor: string, barTintColor: string, backgroundColor: string, translucent: boolean, titleColor: string, }

…
include ':react-native-add-calendar-event'
project(':react-native-add-calendar-event').projectDir = new File(rootProject.projectDir,   '../node_modules/react-native-add-calendar-event/android')
```
  1. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-add-calendar-event')

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javaandroidcalendareventevents

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架