Skip to content

Instantly share code, notes, and snippets.

@MutableLoss
Last active July 30, 2017 00:45
Show Gist options
  • Save MutableLoss/d482197813f0178a50892bc1c8ec52c8 to your computer and use it in GitHub Desktop.
Save MutableLoss/d482197813f0178a50892bc1c8ec52c8 to your computer and use it in GitHub Desktop.
react-native-calendar-events event create
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