EddyVerbruggen / Calendar-PhoneGap-Plugin

:date: Cordova plugin to Create, Change, Delete and Find Events in the native Calendar
773 stars 402 forks source link

findEventWithOptions on iOS found all event for all calendars #364

Open Piero87 opened 7 years ago

Piero87 commented 7 years ago

Hi, I have a problem with findEventWithOptions, I'm using it in this way: var startDate = new Date(); var endDate = new Date(new Date().setFullYear(new Date().getFullYear() + 1)); var calOptions = window.plugins.calendar.getCalendarOptions(); calOptions.id = "E94DF9F6-2FE9-422C-AE0C-81707C6E4AFA"; calOptions.name = "Calendar"; window.plugins.calendar.findEventWithOptions("","","",startDate,endDate,calOptions,onSuccess,onError);

but the callback give me all the events for all the calendars, and not only for that calendar I requested, someone can help me?

EddyVerbruggen commented 7 years ago

Try calOptions.calendarName = "Calendar" instead, and remove calOptions.id.

Piero87 commented 7 years ago

Thanks! It works! for android what I have to use? id or name?