Skip to content

Commit

Permalink
#161 Added modifyEventWithOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed May 16, 2015
1 parent 467e412 commit 9281e89
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 150 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ Basic operations, you'll want to copy-paste this for testing purposes:
var newTitle = "New title!";
window.plugins.calendar.modifyEvent(title,eventLocation,notes,startDate,endDate,newTitle,eventLocation,notes,startDate,endDate,success,error);

// or to add a reminder, make it recurring, change the calendar, or the url, use this one:
var filterOptions = window.plugins.calendar.getCalendarOptions(); // or {} or null for the defaults
filterOptions.calendarName = "Bla"; // only filter option currently implemented (iOS only)
var newOptions = window.plugins.calendar.getCalendarOptions();
newOptions.calendaName = "New Bla"; // make sure this calendar exists before moving the event to it
newOptions.firstReminderMinutes = 120; // etc
window.plugins.calendar.modifyEventWithOptions(title,eventLocation,notes,startDate,endDate,newTitle,eventLocation,notes,startDate,endDate,filterOptions,newOptions,success,error);

// delete an event (you can pass nulls for irrelevant parameters, note that on Android `notes` is ignored). The dates are mandatory and represent a date range to delete events in.
// note that on iOS there is a bug where the timespan must not be larger than 4 years, see issue 102 for details.. call this method multiple times if need be
// since 4.3.0 you can match events starting with a prefix title, so if your event title is 'My app - cool event' then 'My app -' will match.
Expand Down
3 changes: 1 addition & 2 deletions src/ios/Calendar.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
- (void)createEventInteractively:(CDVInvokedUrlCommand*)command;
- (void)createEventInNamedCalendar:(CDVInvokedUrlCommand*)command;

- (void)modifyEvent:(CDVInvokedUrlCommand*)command;
- (void)modifyEventInNamedCalendar:(CDVInvokedUrlCommand*)command;
- (void)modifyEventWithOptions:(CDVInvokedUrlCommand*)command;

- (void)findEventWithOptions:(CDVInvokedUrlCommand*)command;
- (void)findAllEventsInNamedCalendar:(CDVInvokedUrlCommand*)command;
Expand Down
Loading

0 comments on commit 9281e89

Please sign in to comment.