[TIMOB-19439] Date properties of Ti.App.iOS.Searchable* and UserActivity should accept JS Date object
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 5.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Fokke Zandbergen |
Assignee | Unknown |
Created | 2015-08-31T11:21:15.000+0000 |
Updated | 2018-02-28T19:55:35.000+0000 |
Description
The new [Titanium.App.iOS.SearchableItem](https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.App.iOS.SearchableItem), [Titanium.App.iOS.SearchableItemAttributeSet](https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.App.iOS.SearchableItemAttributeSet) and [Titanium.App.iOS.UserActivity](https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.App.iOS.UserActivity) API's all have one or more date-properties, all of which require:
{quote}
The date will be a string in the following format: "yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'" For example, 2015-12-25T23:30:55.978+0000
{quote}
Since Titanium developers work with the JS Date object all the time, we should support that (as well) just like we do in many other API's like [Titanium.App.iOS.LocalNotification](https://appcelerator.github.io/appc-docs/latest/#!/api/NotificationParams-property-date) and [Titanium.UI.Picker](https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.Picker-property-maxDate)
Also, [~bhatfield] the current API reference for the value contains a typo. The
'
) betweenSSS
and+0000
should not be there if you see the example value. And the given format is not usable in JavaScript, in particular the momentjs library that ships with Alloy. To get the correct format there you need: