0

I am trying to use ionic calendar plugin in my project but I am getting : Object(...) is not a function whenever I try to show the calendar.
My html code is:

<div class="appoint-ser"><span  (click)="opencal()">Select Appointment Date</span></div>

And my ts code is:

 import { Calendar } from '@ionic-native/calendar/ngx';
      constructor(

    private calendar: Calendar,
    ) {


      }

     opencal(){
        this.calendar.createCalendar('MyCalendar').then(
          (msg) => { console.log(msg); },
          (err) => { console.log(err); }
        );
      }
theCoder
  • 731
  • 3
  • 11
  • 19
  • what is the ionic-native wrapper version you are using? Use v4.x with ionic 3. This seems to be a common issue for ionic native 5.x and ionic 3 – Suraj Rao Feb 12 '19 at 09:24
  • currently i have 2.9.0 ionic-native wrapper version – theCoder Feb 12 '19 at 09:27
  • `import { Calendar } from '@ionic-native/calendar/ngx';` is for ionic natve 5.x. GO through https://ionicframework.com/docs/v3/native/ – Suraj Rao Feb 12 '19 at 09:28

0 Answers0