[TIMOB-27840] Android: Add "Ti.UI.PICKER_TYPE_DATE_AND_TIME" support
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Low |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | android, date, parity, picker, time |
| Reporter | Joshua Quick |
| Assignee | Joshua Quick |
| Created | 2020-04-11T00:56:19.000+0000 |
| Updated | 2020-04-11T01:00:15.000+0000 |
Description
*Summary:*
The
Ti.UI.Picker type PICKER_TYPE_DATE_AND_TIME is currently an iOS only feature.
https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Picker-property-type
We should add support to Android for parity with iOS.
*Note:*
Android does natively support a date-only and time-only pickers. Just not both.
* PICKER_TYPE_DATE
* PICKER_TYPE_TIME
*Recommended Solution:*
Use a horizontal layout to contain to clickable labels. The left-aligned label will display the date and the right-aligned label will display the time. When tapping on them, their respective native date or time dialog will appear.
[ [DateLabel] [TimeLabel] ]
This is how Google's Calendar app displays date/time fields when you under the "Add Event" window as can be seen below.
!Android-DateTimeField.png|thumbnail! !Android-DateDialog.png|thumbnail! !Android-TimeDialog.png|thumbnail!
Attachments
| File | Date | Size |
|---|---|---|
| Android-DateDialog.png | 2020-04-11T00:55:59.000+0000 | 174574 |
| Android-DateTimeField.png | 2020-04-11T01:00:15.000+0000 | 174006 |
| Android-TimeDialog.png | 2020-04-11T00:56:02.000+0000 | 176222 |
No comments