[AC-5609] Android: All events in Ti.Calendar.Calendar.getEventsBetweenDates have the same id
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2018-02-22T13:55:09.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | android, calendar |
| Reporter | Michiel van Eerd |
| Assignee | Shak Hossain |
| Created | 2018-02-21T10:45:24.000+0000 |
| Updated | 2018-02-22T13:55:09.000+0000 |
Description
All events returned from Ti.Calendar.Calendar.getEventsBetweenDates have the same id. This makes it impossible to handle a click event and let users edit this event in the calendar app. The events returned from a call to Ti.Calendar.Calendar.getEventsInDate have the correct id's.
Hello, Please provide a sample reproducible code that regenerates the issue. Also, provide a list of steps to follow for successful regeneration. Thanks.
var calendarId = 1; // Run this code on Android // Of course set a correct calendar id and make sure you have some events in it :-) var calendar = Ti.Calendar.getCalendarById(calendarId); var now = new Date(); var events = calendar.getEventsBetweenDates( new Date(now.getFullYear(), now.getMonth(), now.getDate()), new Date(now.getFullYear() + 1, now.getMonth(), now.getDate())); events.forEach(function(event) { console.log(event.id); });Sorry to waste your time: this is caused by the fact that the events I saw where repeated events, so I guess that's the reason they all have the same id. So this can be closed.