Last active
July 30, 2017 00:45
-
-
Save MutableLoss/d482197813f0178a50892bc1c8ec52c8 to your computer and use it in GitHub Desktop.
react-native-calendar-events event create
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RNCalendarEvents.saveEvent(`Example Event`, { | |
location:'Our Awesome Place City, State', | |
notes: `${this.props.title}`, | |
description: `${this.props.title}`, | |
startDate: firstTime.toISOString(), | |
endDate: lastTime.toISOString(), | |
calendar: ['Calendar'], | |
alarm: [{ | |
date:-1 | |
}], | |
}) | |
.then(id => { | |
// we can get the event ID here if we need it | |
Linking.URL(`cal:${firstTime.getTime()}`); | |
}).catch(error => console.log('Save Event Error: ', error)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment