Skip to content

Instantly share code, notes, and snippets.

@amandeepmittal
Created June 9, 2020 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amandeepmittal/84d2c773c21608ade054041eaa8a2a7f to your computer and use it in GitHub Desktop.
Save amandeepmittal/84d2c773c21608ade054041eaa8a2a7f to your computer and use it in GitHub Desktop.
function addEventToCalendar(title, startDateUTC) {
const eventConfig = {
title: eventTitle,
startDate: utcDateToString(startDateUTC),
endDate: utcDateToString(moment.utc(startDateUTC).add(1, 'hours')),
notes: 'Default Event Description'
};
AddCalendarEvent.presentEventCreatingDialog(eventConfig)
.then(eventInfo => {
alert(JSON.stringify(eventInfo));
})
.catch(error => {
alert('Error ', error);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment