Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

24h mode for timepicker?

is it possible to change the timepicker from am/pm to 24h mode?

thx

— asked November 25th 2010 by marcin kolonko
  • android
  • picker
  • time
  • timepicker
1 Comment
  • btw, i tried to change the android settings to use 24h in date & time

    — commented November 25th 2010 by marcin kolonko

4 Answers

  • on iPhone this is linked to the 'International' settings of the simulator. You can changed it in the Settings menu on your iPhone simulator. Not sure about Android though.

    — answered November 25th 2010 by Tom Schouteden
    permalink
    0 Comments
  • Up? Did someone manage to change the time picker to 24h mode ?
    The examples from Kitchen Sink show AM/PM even tough my Android phone uses french settings.
    I'm developing an application for my school and it would be really weird for the students here to have to pick a time choosing between AM or PM :(

    — answered April 24th 2011 by Christine Daunique
    permalink
    0 Comments
  • Hi Christine,

    You cannot programmatically control the Display of time in AM/PM or 24hrs …

    Quick Solution is to prompt the user to set 24hr format via Settings->General->Date & Time->24-Hour Time.->on

    — answered April 24th 2011 by Satta Ravi
    permalink
    1 Comment
    • Hello,

      Thank you for you answer.
      But I already set 24hours format in my settings and just like marcin kolonko, it doesn't change anything: the user still have to click either on the 'AM' or the 'PM' button of the picker (which is not the case in the built-in calendar application, for example)
      Tested both on the Android simulator and my own smartphone.
      I don't know about the Iphone though.

      — commented April 24th 2011 by Christine Daunique
  • Ok, I found a workaround for android by using the 'useSpinner' property of the picker to true. Indeed, I don't know why, but the spinner can display the time in 24hours mode :)

    — answered May 5th 2011 by Christine Daunique
    permalink
    1 Comment
    • Christine,
      have you found a solution without the useSpinner property ?
      I don't want to change the aspect of the picker.
      Merci

      — commented March 5th 2012 by Armindo Da Silva
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.