Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20441] Android: Implement TimePicker with `minuteInterval` property

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-03-29T21:12:02.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.4.0
ComponentsAndroid
Labelsn/a
ReporterAshraf Abu
AssigneeAshraf Abu
Created2016-02-23T05:34:50.000+0000
Updated2017-03-29T21:41:10.000+0000

Description

Android TimePicker should have the property minuteInterval. For more information, refer to TIMOB-17998

Attachments

FileDateSize
Screenshot_1490820489.png2017-03-29T20:53:20.000+000056324
Screen Shot 2017-03-29 at 2.04.25 PM.png2017-03-29T21:05:59.000+000087698

Comments

  1. Ashraf Abu 2016-03-31

    PR: https://github.com/appcelerator/titanium_mobile/pull/7898 This is also to solve the issue in TIMOB-17998
  2. Lokesh Choudhary 2016-06-13

    Verified the implementation of the minuteInterval property. With this property we get the minute native spinner (with nativeSpinner set to true) with the specified interval. Closing. Environment: Appc Studio : 4.6.0.201605201934 Ti SDK : 5.4.0.v20160608165242 Ti CLI : 5.0.8 Alloy : 1.8.7 MAC El Capitan : 10.11.4 Appc NPM : 4.2.7-2 Appc CLI : 5.4.0-11 Node: 4.4.4 Nexus 6 - Android 6.0.0
  3. Brian Knorr 2017-03-29

    This does not work with Ti SDK 6.0.3. No matter what you set the minuteInterval to it's always in 1 minute increments on Android. Please re-open.
  4. Lokesh Choudhary 2017-03-29

    Reopening to add screenshot.
  5. Lokesh Choudhary 2017-03-29

    [~btknorr], I am not able to reproduce the issue you are seeing. Sample code below was run on 6.0.3.GA:
       var win = Ti.UI.createWindow({
           backgroundColor : 'black',
           layout : 'vertical'
       });
       
       var picker = Ti.UI.createPicker({
           type:Ti.UI.PICKER_TYPE_TIME,
           nativeSpinner: true,
           format24: false,
           minuteInterval: 10,
           minDate:new Date(2009,0,1),
           maxDate:new Date(2014,11,31),
           value:new Date(2014,3,12)
       });
       
       picker.addEventListener('change',function(e){
         Ti.API.info("User selected date: " + e.value.toLocaleString());
       });
       
       var picker2 = Ti.UI.createPicker({
           type:Ti.UI.PICKER_TYPE_TIME,
           nativeSpinner: true,
           format24: true,
           minuteInterval: 1,
           minDate:new Date(2009,0,1),
           maxDate:new Date(2014,11,31),
           value:new Date(2014,3,12)
       });
       
       picker2.addEventListener('change',function(e){
         Ti.API.info("User selected date: " + e.value.toLocaleString());
       });
       
       win.add(picker);
       win.add(picker2);
       win.open(); 
       
    Screenshot: !Screenshot_1490820489.png!
  6. Brian Knorr 2017-03-29

    Try the Samsung S7 Android OS 6.0.0 using Genymotion and you will see the issue.
  7. Brian Knorr 2017-03-29

    Are you seriously going to make me create a new issue for this? Wow.
  8. Lokesh Choudhary 2017-03-29

    Reopening to attach Genymotion screenshot.
  9. Lokesh Choudhary 2017-03-29

    Tried Genymotion Samsung S7 Android 6.0.0, but no luck. Do you have any test case for me to check ? !Screen Shot 2017-03-29 at 2.04.25 PM.png!
  10. Brian Knorr 2017-03-29

    We are calling showTimePickerDialog on the picker.
  11. Brian Knorr 2017-03-29

    [http://imgr.es/3O8M]
  12. Brian Knorr 2017-03-29

    Seems like I would need to open a new ticket for this though, correct?
  13. Lokesh Choudhary 2017-03-29

    Yeah this is a feature ticket. You can open another issue for what you are seeing with the appropriate test case, attachments & data if any. It would then go under the process of trying to reproduce on our side etc etc.

JSON Source