Eddy Verbruggen's Calendar plugin with ionic - Can't find variable cordova

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;


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
ionic -v

Any ideas?

Thanks in advance!


Hmm, lets try this

$ ionic platform rm ios
$ ionic platform add ios

Sounds like an issue on cordova’s side.

Replace Calendar with CalendarOriginal