Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5609] Android: All events in Ti.Calendar.Calendar.getEventsBetweenDates have the same id

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2018-02-22T13:55:09.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, calendar
ReporterMichiel van Eerd
AssigneeShak Hossain
Created2018-02-21T10:45:24.000+0000
Updated2018-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.

Comments

  1. Sharif AbuDarda 2018-02-21

    Hello, Please provide a sample reproducible code that regenerates the issue. Also, provide a list of steps to follow for successful regeneration. Thanks.
  2. Michiel van Eerd 2018-02-22

       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);
       });
       
  3. Michiel van Eerd 2018-02-22

    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.

JSON Source