This API allows you to add events to the Calendar of the mobile device.
var startDate = new Date(2015,2,15,18,30,0,0,0); // beware: month 0 = january, 11 = december
var endDate = new Date(2015,2,15,19,30,0,0,0);
var title = "My New Event";
var eventLocation = "Home";
var notes = "Some notes about this event.";
// create an event silently
Calendar.createEvent(
title,
eventLocation,
notes,
startDate,
endDate
);
var startDate = new Date(2015, 2, 15, 18, 30, 0, 0, 0); // beware: month 0 = january, 11 = december
var endDate = new Date(2015, 2, 15, 19, 30, 0, 0, 0);
var title = "My New Event";
var eventLocation = "Home";
var notes = "Some notes about this event.";
// create an event silently
window.Calendar.createEvent(
title,
eventLocation,
notes,
startDate,
endDate
);
var startDate = new Date(2015, 2, 15, 18, 30, 0, 0, 0); // beware: month 0 = january, 11 = december
var endDate = new Date(2015, 2, 15, 19, 30, 0, 0, 0);
var title = "My New Event";
var eventLocation = "Home";
var notes = "Some notes about this event.";
// create an event silently
window.Calendar.createEvent(
title,
eventLocation,
notes,
startDate,
endDate
);
var startDate = new Date(2015, 2, 15, 18, 30, 0, 0); // beware: month 0 = january, 11 = december
var endDate = new Date(2015, 2, 15, 19, 30, 0, 0);
var title = "My New Event";
var eventLocation = "Home";
var notes = "Some notes about this event.";
// create an event silently
(<any>window).Calendar.createEvent(
title,
eventLocation,
notes,
startDate,
endDate
);
var startDate = new Date(2015, 2, 15, 18, 30, 0, 0, 0); // beware: month 0 = january, 11 = december
var endDate = new Date(2015, 2, 15, 19, 30, 0, 0, 0);
var title = "My New Event";
var eventLocation = "Home";
var notes = "Some notes about event.";
// create an event silently
window.Calendar.createEvent(
title,
eventLocation,
notes,
startDate,
endDate
);
createCalendar(nameOrOptions: string | NameOrOptions): Promise<any>
Create a calendar.
createEvent(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date): Promise<any>
Silently create an event.
createEventWithOptions(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date, options?: CalendarOptions): Promise<any>
Silently create an event with additional options.
createEventInteractively(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date): Promise<any>
Interactively create an event.
createEventInteractivelyWithOptions(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date, options?: CalendarOptions): Promise<any>
Silently create an event with additional options.
deleteCalendar(calendarName: string): Promise<any>
Delete a calendar.
deleteEvent(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date): Promise<any>
Delete an event.
deleteEventById(id: string, fromDate?: Date): Promise<any>
Delete an event by id.
deleteEventFromNamedCalendar(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date, calendarName?: string): Promise<any>
Delete an event from the specified Calendar.
findAllEventsInNamedCalendar(calendarName: string): Promise<any>
Get a list of all future events in the specified calendar.
findEvent(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date): Promise<any>
Find an event.
findEventWithOptions(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date, options?: CalendarOptions): Promise<any>
Find an event with additional options.
getCalendarOptions(calendarName: string): CalendarOptions
Returns the default calendar options.
getCreateCalendarOptions(calendarName: string): NameOrOptions
Returns the default calendar options.
hasReadPermission(): Promise<boolean>
Check if we have read permission.
hasReadWritePermission(): Promise<boolean>
This function checks if we have permission to read/write from/to the calendar. If this returns false, you should call the requestReadWritePermission function.
hasWritePermission(): Promise<boolean>
Check if we have write permission.
listCalendars(): Promise<any>
Get a list of all calendars.
listEventsInRange(): Promise<any>
Find a list of events within the specified date range.
modifyEvent(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date, newTitle?: string, newLocation?: string, newNotes?: string, newStartDate?: Date, newEndDate?: Date): Promise<any>
Modify an event.
modifyEventWithOptions(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date, newTitle?: string, newLocation?: string, newNotes?: string, newStartDate?: Date, newEndDate?: Date, filterOptions?: calendarOptions, newOptions?: calendarOptions): Promise<any>
Modify an event.
openCalendar(date: Date): Promise<any>
Open the calendar at the specified date.
requestReadPermission(): Promise<any>
Request read permission.
requestReadWritePermission(): Promise<any>
Requests read/write permissions.
requestWritePermission(): Promise<any>
Request write permission.
interface NameOrOptions { // The name of the calendar name : string; // The color of the calendar color : string (hexadecimal) }
interface CalendarOptions { // Calendar id calendarId? : number; // First reminder in minutes firstReminderMinutes? : number; // Id id? : string; // Recurrence. Can be set to "daily", "weekly", "monthly" or "yearly" recurrence? : string; // Recurrence end date. Valid only when recurrence option is set recurrenceEndDate? : Date; // Recurrence interval. Valid only when recurrence option is set recurrenceInterval? : number; // Second reminder in minutes secondReminderMinutes? : number; // URL url? : string; }