Calendar-PhoneGap-Plugin
Calendar-PhoneGap-Plugin copied to clipboard
Calendar Native works weird for me
I'm using ionic3 and when I load event, it's weird.
I logged item in below code which should be event object of calendar it dosent have notes only have allDay, calendar_id,dtend,dtstart,eventLocation,event_id,id,title object. and tend and dtstart come with unix timestamp. I think it should be startDate and endDate. not dtstart/dtend. and unix timestamp comes with weird number. when I calculate to human Date , it says 2025/08/25 like this.
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);
}
);
}