Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am developing phonegap ios app which should have calendar that insert, delete and modify even from my app to native calendar

so, I used EddyVerbruggen Calendar-PhoneGap-Plugin. The link is

https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin

The sample I worked is


JavaScript
var title = 'test title';
var loc = 'chennai';
var notes = 'test Notes';
var eventstartdate = "2015,1,15,0,0,0,0,0";
var eventenddate = "2015,1,16,0,0,0,0,0";
var fulleventstartdate = new Date(feventstartdate);
var fulleventenddate = new Date(feventenddate);
 
//---To Create calendar--------------------------------------
function createCalendar() {
var createCalOptions = window.plugins.calendar.getCreateCalendarOptions();
createCalOptions.calendarName = "Mycal";
createCalOptions.calendarColor = "#ffec8b";
window.plugins.calendar.createCalendar(createCalOptions, onSuccess, onError);
}
 
//---To Create event--------------------------------------
function createevent() {
window.plugins.calendar.createEventInNamedCalendar(title, location, notes, fulleventstartdate, fulleventenddate, calendarName, onSuccess, onError);
}
 
//---To delete event--------------------------------------
function deleteevent() {
window.plugins.calendar.deleteEventFromNamedCalendar(title, loc, notes, fulleventstartdate, fulleventenddate, calendarName, onSuccess, onError);
}
 
//---To modify event--------------------------------------
function updates() {
 
var newTitle = "New title";
window.plugins.calendar.modifyEventInNamedCalendar(title, loc, notes, fulleventstartdate, fulleventenddate, newTitle, loc, notes, fulleventstartdate, fulleventenddate, calendarName, onSuccess, onError);
}
 
window.onerror = function (msg, file, line) {
alert(msg + '; ' + file + '; ' + line);
};
 

function onSuccess(msg) { alert('Calendar success: ' + JSON.stringify(msg)); }




in the above code creating calendar and inserting calendar works well

but, Delete event and Modify event (update) not working in ios

what else i have to do to fix it

kindly reply ASSP

Note: I build my app through phonegap build for ipa file
Posted

1 solution

Please do not post the same question in multiple forums.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900