Javascript 如何使用Java脚本将提醒添加到移动设备日历中?

Javascript 如何使用Java脚本将提醒添加到移动设备日历中?,javascript,Javascript,如何使用Java脚本将提醒添加到移动设备日历中?我想在Phonegap应用程序中使用此脚本。您可以使用Phonegap日历插件添加事件: e、 g 然后,您可以向事件添加提醒: // or to add a reminder, make it recurring, change the calendar, or the url, use this one: var filterOptions = window.plugins.calendar.getCalendarOptions(); //

如何使用Java脚本将提醒添加到移动设备日历中?我想在Phonegap应用程序中使用此脚本。

您可以使用Phonegap日历插件添加事件:

e、 g

然后,您可以向事件添加提醒:

  // 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"; // iOS only
filterOptions.id = "D9B1D85E-1182-458D-B110-4425F17819F1"; // iOS only, get it from createEventWithOptions (if not found, we try matching against title, etc)
var newOptions = window.plugins.calendar.getCalendarOptions();
newOptions.calendaName = "New Bla"; // make sure this calendar exists before moving the event to it
// not passing in reminders will wipe them from the event. To wipe the default first reminder (60), set it to null.
newOptions.firstReminderMinutes = 120;
  window.plugins.calendar.modifyEventWithOptions(title,eventLocation,notes,startDate,endDate,newTitle,eventLocation,notes,startDate,endDate,filterOptions,newOptions,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"; // iOS only
filterOptions.id = "D9B1D85E-1182-458D-B110-4425F17819F1"; // iOS only, get it from createEventWithOptions (if not found, we try matching against title, etc)
var newOptions = window.plugins.calendar.getCalendarOptions();
newOptions.calendaName = "New Bla"; // make sure this calendar exists before moving the event to it
// not passing in reminders will wipe them from the event. To wipe the default first reminder (60), set it to null.
newOptions.firstReminderMinutes = 120;
  window.plugins.calendar.modifyEventWithOptions(title,eventLocation,notes,startDate,endDate,newTitle,eventLocation,notes,startDate,endDate,filterOptions,newOptions,success,error);