Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25917

Android: Allow picker minDate/maxDate properties to be set dynamically

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 7.1.0
    • Fix Version/s: Release 7.3.0
    • Component/s: Android, TiAPI
    • Environment:

      TiSDK 7.1.0.GA
      Android

    • Story Points:
      3
    • Sprint:
      2018 Sprint 14 SDK

      Description

      On iOS it is possible to change the minDate/maxDate on runtime, on Android this is not possible due to TiSDK constraint in the code.

      Test code

      var win = Ti.UI.createWindow({
          title: 'Form',
      });
       
      /*
      // working
      var dp = Ti.UI.createPicker({
         type: Ti.UI.PICKER_TYPE_DATE,
         minDate: new Date(2018,1,1)
      });
      */
       
      var dp = Ti.UI.createPicker({
         type: Ti.UI.PICKER_TYPE_DATE
      });
       
      // not working
      dp.setMinDate(new Date(2018,1,1));
       
      win.add(dp);
      dp.showDatePickerDialog();
      win.open();
      

      Observed Behaviour:
      Setting minDate on creation works, adjusting it after doesn't

      Expected behaviour:
      On Android setting minDate/maxDate on runtime (after creation) should work as it does on iOS.

      Community Credit:
      Joren Vos for finding the issue, Michael Gangolf for helping locating the problem/creating test code.

        Attachments

          Activity

            People

            • Assignee:
              ybanev Yordan Banev
              Reporter:
              topener Rene Pot
              Reviewer:
              Joshua Quick
            • Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code