[TIMOB-14953] iOS: Ti.Calendar getEventsBetweenDates is not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-02-22T19:48:39.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | Release 5.4.0 |
Components | iOS |
Labels | defect, ios, qe-5.4.0 |
Reporter | Dan Tamas |
Assignee | Angel Petkov |
Created | 2013-08-19T14:22:20.000+0000 |
Updated | 2016-08-08T19:25:52.000+0000 |
Description
on iOS getEventsBetweenDates method is not working:
- it is misspelled: **getEventsBeteenDates** (missing "w")
- if I call the method this way, no matter what I'm trying to put as arguments (dates or strings) is not working
if I put a strings (like "2014-02-19T16:17:46+01:00") I get
"*** -[EKEventStore predicateForEventsWithStartDate:endDate:calendars:]: startDate is nil";
if I put dates I get
message = "Invalid type passed to function";
nativeLocation = "-[TiCalendarCalendar getEventsBeteenDates:] (TiCalendarCalendar.m:157)";
nativeReason = "expected: String, was: __NSDate";
Here is the fix for now... After fixing the misspelling in TiCalendarCalendar.m, the getEventsBetweenDates is expecting two date strings in full UTC format like so: yyyy-MM-ddTHH:mm:ss.SSS+0000 My javascript example:
Works perfectly.
Hi Sean, thnx for the workaround. I use a module for now but this needs to be fixed.
This is still an issue. Could we get a fix in place for this?
Has there been any updates in regards to the spelling issue here? This bug is of low priority, but it forces developers to make the fix themselves when they update Titanium/add new developers to their project. Thanks!
+1 We encountered this last year, and it still is a very serious pain that we need to modify the file in the titanium library folder every time we want to use a new build of the platform. What is the time frame for this fix? It seems to be a simple mispelling as @Melissa said above.
Changes spelling and did a change so you can pass in Date objects and strings , instead of just strings.
PR pending: https://github.com/appcelerator/titanium_mobile/pull/7756
[~ndustri] [~rborn] Can you validate that the PR is working for your use cases as well? I need to setup some demo dates first to finish CR and FT on this ticket. Thanks guys!
(y)(y)
Verified as fixed. Tested On: iPhone 6S (9.3.3) Device Mac OSX El Capitan 10.11.6 Ti SDK: 5.4.0.v20160804185318 Appc Studio: 4.7.0.201607250649 Appc NPM: 4.2.7 App CLI: 5.4.0-40 Xcode 7.3.1 Node v4.4.7 *Closing ticket.*