npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@shoutem/react-native-calendar-manager

v1.1.1

Published

A calendar manager for react-native

Downloads

535

Readme

@shoutem/react-native-calendar-manager

Note We renamed the package from react-native-calendar-manager to @shoutem/react-native-calendar-manager because the name was already taken on npm before we published.

A calendar manager for React Native. Exposes addEvent method which can save an event to an Android or iOS device's native calendar app.

Supported React Native platforms

  • Android
  • iOS

Plugin installation

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

Linking

If you're running React Native 0.60.0+, you're done, this module supports autolinking. If you're using React Native 0.59.10 and lower, check tag v1.0.7 instructions.

Otherwise, check the manual linking section.

Manual linking

iOS

  1. Open your project in Xcode, right click on Libraries and click Add Files to "Your Project Name" Look under node_modules/@shoutem/react-native-calendar-manager and add CalendarManager.xcodeproj.
  2. Add libCalendarManager.a to Build Phases -> Link Binary With Libraries
  3. Click on CalendarManager.xcodeproj in Libraries and go the Build Settings tab. Double click the text to the right of Header Search Paths and verify that it has the lines $(SRCROOT)/../../node_modules/react-native/React/** and $(SRCROOT)/node_modules/react-native/React/** - if it doesn't, then add them. This is so Xcode is able to find the headers that the CalendarManager source files are referring to by pointing to the header files installed within the react-native node_modules directory.

Android

  1. in android/settings.gradle
#!groovy
   ...
   include ':@shoutem/react-native-calendar-manager'
   project(':@shoutem/react-native-calendar-manager').projectDir = new File(rootProject.projectDir, '../node_modules/@shoutem/react-native-calendar-manager/android')
  1. in android/app/build.gradle add:
#!groovy
   dependencies {
       ...
       implementation project(':@shoutem/react-native-calendar-manager')
   }
  1. and finally, in android/src/main/java/com/{YOUR_APP_NAME}/MainApplication.java add:
#!java
   //... MainApplication.java
   import com.shoutem.calendar.CalendarManagerPackage; // <--- add this!
   //...

   @Override
   protected List<ReactPackage> getPackages() {
     return Arrays.<ReactPackage>asList(
       ...
       packages.add(new CalendarManagerPackage()); // <---- add this!
     );
   }

Example

import CalendarManager from '@shoutem/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,
})