Details

      Description

      {html}<div><p><strong><em>Problem</em></strong></p>
      <p>format24:false still returns 24 hour time in the picker</p>
      <p><strong><em>Test Code</em></strong> Tested on 1.6 and 1.7
      (03/10/11) APIs 2.1 & 2.2</p>
      <pre>
      <code>var win = Titanium.UI.createWindow({
      title:'Tab 1',
      backgroundColor:'#fff'
      });
      var picker = Ti.UI.createPicker({ top: 20, type: Ti.UI.PICKER_TYPE_TIME, minuteInterval: 30, useSpinner: true });
      win.add(picker);
      win.open();</code>
      </pre>
      <p><strong><em>Ticket Reference</em></strong></p>
      <p><a href=
      "http://developer.appcelerator.com/helpdesk/view/76372">http://developer.appcelerator.com/helpdesk/view/76372</a></p></div>{html}

        Issue Links

          Activity

          Hide
          Zipcar (Goss) added a comment -
          {html}<div><p>I have some code that may be relevant to this, planning to
          submit a pull request later this week.</p></div>{html}
          Show
          Zipcar (Goss) added a comment - {html}<div><p>I have some code that may be relevant to this, planning to submit a pull request later this week.</p></div>{html}
          Hide
          Bill Dawson added a comment -
          {html}<div><p>This is not a defect, so I removed the "defect" tag and put in
          "feature". This was an undocumented flag, precisely because it was
          an unimplemented feature. </p>
          <p>Nice test app.js for QE:</p>
          <pre>
          <code class=
          "javascript">/*global Ti, Titanium, alert, JSON, require, setTimeout, setInterval */
          Titanium.UI.setBackgroundColor('#000');
          var win = Titanium.UI.createWindow({ title:'Test', backgroundColor:'#000', exitOnClose: true });

          var lbl = Ti.UI.createLabel({ bottom: "10dp", height: "40dp", left: 5, right: 5, backgroundColor: 'blue', color: 'yellow' });
          win.add(lbl);

          var p = Ti.UI.createPicker({ type: Ti.UI.PICKER_TYPE_TIME, useSpinner:true, format24:false, top: 10, height: 'auto', width: 'auto' });
          p.addEventListener('change', function(e){ lbl.text = e.value; });
          win.add(p);

          var btn = Ti.UI.createButton({ bottom: "60dp", height: "40dp", left: 5, right: 5, title: 'Set to now' });
          win.add(btn);
          btn.addEventListener('click', function(){ p.value = new Date(); });

          var btn2 = Ti.UI.createButton({ bottom: "105dp", height: "40dp", left: 5, right: 5, title: 'toggle am/pm' });
          win.add(btn2);
          btn2.addEventListener('click', function(){
          var format24 = p.format24;
          if (format24) { format24 = false; } else { format24 = true; }
          p.format24 = format24;
          });

          var btn3 = Ti.UI.createButton({ bottom: "150dp", height: "40dp", left: 5, right: 5, title: 'check time' });
          win.add(btn3);
          btn3.addEventListener('click', function(){ lbl.text = p.value; });
          win.open();</code>
          </pre></div>{html}
          Show
          Bill Dawson added a comment - {html}<div><p>This is not a defect, so I removed the "defect" tag and put in "feature". This was an undocumented flag, precisely because it was an unimplemented feature. </p> <p>Nice test app.js for QE:</p> <pre> <code class= "javascript">/*global Ti, Titanium, alert, JSON, require, setTimeout, setInterval */ Titanium.UI.setBackgroundColor('#000'); var win = Titanium.UI.createWindow({ title:'Test', backgroundColor:'#000', exitOnClose: true }); var lbl = Ti.UI.createLabel({ bottom: "10dp", height: "40dp", left: 5, right: 5, backgroundColor: 'blue', color: 'yellow' }); win.add(lbl); var p = Ti.UI.createPicker({ type: Ti.UI.PICKER_TYPE_TIME, useSpinner:true, format24:false, top: 10, height: 'auto', width: 'auto' }); p.addEventListener('change', function(e){ lbl.text = e.value; }); win.add(p); var btn = Ti.UI.createButton({ bottom: "60dp", height: "40dp", left: 5, right: 5, title: 'Set to now' }); win.add(btn); btn.addEventListener('click', function(){ p.value = new Date(); }); var btn2 = Ti.UI.createButton({ bottom: "105dp", height: "40dp", left: 5, right: 5, title: 'toggle am/pm' }); win.add(btn2); btn2.addEventListener('click', function(){ var format24 = p.format24; if (format24) { format24 = false; } else { format24 = true; } p.format24 = format24; }); var btn3 = Ti.UI.createButton({ bottom: "150dp", height: "40dp", left: 5, right: 5, title: 'check time' }); win.add(btn3); btn3.addEventListener('click', function(){ lbl.text = p.value; }); win.open();</code> </pre></div>{html}
          Hide
          Don Thorp added a comment -

          Tested on Nexus One 2.3.3.

          Show
          Don Thorp added a comment - Tested on Nexus One 2.3.3.

            People

            • Assignee:
              Bill Dawson
              Reporter:
              Alan Leard
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development