Hey guys,
I installed the plugin mentioned here, I tried first with the automatic way:
cordova plugin add https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin.git
cordova build
But I saw errors about Calendar.{h,m} missing in more than one directory. I tried first to copy manually the files, but was a mess!
So the second try was manually, I followed all the steps mentioned in the offiicial gitHub project, no errors when I’m building the project, but when I run bot in the serve and in the device, the error: “Can’t find variable cordova” in the file Calendar.js appears. Not sure if is about a deprecate thing or somethign else. the code there is:
Calendar.install = function () {
if (!window.plugins) {
window.plugins = {};
}
window.plugins.calendar = new Calendar();
return window.plugins.calendar;
};
cordova.addConstructor(Calendar.install);
I tried with window.cordova.addCons… window.Cordova.addCons… but nothing, the same error. So the app is crashing when I’m trying to use: window.plugins.calendar.createEvent(title,‘Location’,‘Notes’,startDate,endDate,success,error);
My versions:
cordova -v
4.2.0
ionic -v
1.3.11
Any ideas?
Thanks in advance!
Cheers