我在" 2017-11-24T05:27:00.000Z"这种格式为addToCalendar
。在iOS上它工作正常,但android给出了上述错误。
var start_date = "2017-11-24T05:27:00.000Z";
var end_date = "2017-11-27T05:27:00.000Z"
const eventConfig = {title:'Event name', location:'Satara', notes:'Added event', startDate: start_date, endDate: end_date};
addCalendarEvent(eventConfig) {
AddCalendarEvent.presentNewCalendarEventDialog(eventConfig)
.then(eventId => {
// handle success (receives event id) or dismissing the modal (receives false)
if (eventId) {
alert('Event Created');
} else {
console.warn('dismissed');
}
})
.catch((error: string) => {
// handle error such as when user rejected permissions
console.warn(error);
});
}