Hello
I’m using calendar plugin(cordova-plugin-calendar version : 5.12)
I think it works weird.
I logged msg.forEach’s callback item.
item should be an event object which load all the events data of calendar event.
I think it should contain title, location, notes, message, startDate, endDate
but logs says it contain information of below picture (it even dosen’t have information of notes that I input !!!)
and as below picture says, dtstart date is weird. if I convert, it says Friday, 18 December 2398
(even though it is 16 of September .
code is as below.
loadEventThisMonth() {
console.log("loadEventThisMonth")
this.eventList = new Array();
var startDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1);
var endDate = new Date(this.date.getFullYear(), this.date.getMonth()+1, 0);
console.log(startDate+"and : "+endDate);
this.calendar.listEventsInRange(startDate, endDate).then(
(msg) => {
console.log("home msg:");
console.log(msg);
msg.forEach(item => {
console.log(item); //
console.log(item.startDate+"///")
this.eventList.push(item);
});
},
(err) => {
console.log(err);
}
);
}