Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5856] Android: Cannot get date spinner to show up

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionDone
Resolution Date2018-08-29T19:03:02.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterJoshua A. Ceaser
AssigneeShak Hossain
Created2018-08-22T17:29:45.000+0000
Updated2018-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

FileDateSize
BAD.jpg2018-08-22T17:27:32.000+0000109404
GOOD.png2018-08-22T17:27:32.000+000014840

Comments

  1. Joshua Quick 2018-08-22

    [~jceaser], Titanium's nativeSpinner property is not supported by dialogs. It is only supported by picker "views" whose type property is set to Ti.UI.PICKER_TYPE_TIME. For example...
       var window = Ti.UI.createWindow({ layout: "vertical" });
       var picker = Ti.UI.createPicker({
       	type: Ti.UI.PICKER_TYPE_TIME,
       	nativeSpinner: true,
       	top: "50dp",
       });
       window.add(picker);
       window.open();
       
    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 the showDatePickerDialog() method if you care about portability.
  2. Joshua A. Ceaser 2018-08-22

    @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!
  3. Joshua Quick 2018-08-22

    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.
  4. Rakhi Mitro 2018-08-28

    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
  5. Joshua A. Ceaser 2018-08-28

    Yes we're good now.

JSON Source