[AC-5856] Android: Cannot get date spinner to show up
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Done |
Resolution Date | 2018-08-29T19:03:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Joshua A. Ceaser |
Assignee | Shak Hossain |
Created | 2018-08-22T17:29:45.000+0000 |
Updated | 2018-08-29T19:03:03.000+0000 |
Description
When attempting to create a Date Picker Spinner on Android, I get the calendar view instead of the spinner view. The flags calendarViewShown set to false and nativeSpinner set to true do not resolve the issue. The calendar has a poor user experience for users who use screen readers.
{noformat}
Ti.UI.createPicker({
calendarViewShown : false,
nativeSpinner : true,
type : Ti.UI.PICKER_TYPE_DATE
}).showDatePickerDialog({
value : new Date(),
callback : function(e) {
if (!e.cancel) {
Ti.API.warn(String.formatDate(e.value, 'medium'));
}
}
});
{noformat}
Attachments
File | Date | Size |
BAD.jpg | 2018-08-22T17:27:32.000+0000 | 109404 |
GOOD.png | 2018-08-22T17:27:32.000+0000 | 14840 |
[~jceaser], Titanium's
nativeSpinner
property is not supported by dialogs. It is only supported by picker "views" whosetype
property is set toTi.UI.PICKER_TYPE_TIME
. For example...Probably not the answer you wanted. But that said, a picker "view" of type
Ti.UI.PICKER_TYPE_DATE
will be displayed as a spinner instead of a calendar. So, you may want to use a view instead. Especially since iOS does not support theshowDatePickerDialog()
method if you care about portability.@Joshua this is the whole issue, it is not being displayed as a spinner, but as a Calendar. We want to use the date spinner !GOOD.png|thumbnail! and we're getting the Calendar !BAD.jpg|thumbnail!
My point is that we don't currently support this feature for "dialogs". We only support it for "views" that you add to windows. Note the
window.add(picker)
I've shown above.Hello [~jceaser], Hope you had a chance to review our last reply.Just following up to check the status and if you need further help on it. Please let us know. Thanks
Yes we're good now.