Skip to content

Commit 9281e89

Browse files
#161 Added modifyEventWithOptions
1 parent 467e412 commit 9281e89

File tree

4 files changed

+208
-150
lines changed

4 files changed

+208
-150
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ Basic operations, you'll want to copy-paste this for testing purposes:
192192
var newTitle = "New title!";
193193
window.plugins.calendar.modifyEvent(title,eventLocation,notes,startDate,endDate,newTitle,eventLocation,notes,startDate,endDate,success,error);
194194

195+
// or to add a reminder, make it recurring, change the calendar, or the url, use this one:
196+
var filterOptions = window.plugins.calendar.getCalendarOptions(); // or {} or null for the defaults
197+
filterOptions.calendarName = "Bla"; // only filter option currently implemented (iOS only)
198+
var newOptions = window.plugins.calendar.getCalendarOptions();
199+
newOptions.calendaName = "New Bla"; // make sure this calendar exists before moving the event to it
200+
newOptions.firstReminderMinutes = 120; // etc
201+
window.plugins.calendar.modifyEventWithOptions(title,eventLocation,notes,startDate,endDate,newTitle,eventLocation,notes,startDate,endDate,filterOptions,newOptions,success,error);
202+
195203
// 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.
196204
// 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
197205
// 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.

src/ios/Calendar.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
- (void)createEventInteractively:(CDVInvokedUrlCommand*)command;
2727
- (void)createEventInNamedCalendar:(CDVInvokedUrlCommand*)command;
2828

29-
- (void)modifyEvent:(CDVInvokedUrlCommand*)command;
30-
- (void)modifyEventInNamedCalendar:(CDVInvokedUrlCommand*)command;
29+
- (void)modifyEventWithOptions:(CDVInvokedUrlCommand*)command;
3130

3231
- (void)findEventWithOptions:(CDVInvokedUrlCommand*)command;
3332
- (void)findAllEventsInNamedCalendar:(CDVInvokedUrlCommand*)command;

0 commit comments

Comments
 (0)