Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > TimePicker > how to control time display format

Not answered how to control time display format

Feed from this thread
  • Giancarlo Aguilera avatar

    Posted on Sep 2, 2008 (permalink)

    Hello Telerik!

    Is there any way to control the format in which the time is displayed and entered? Like for in a format such as h:mm tt?

    Thanks very much

    Reply

  • Bobi Bobi admin's avatar

    Posted on Sep 3, 2008 (permalink)

    Hello Giancarlo Aguilera,

    Thank you for your question.

    Currently, RadtimePicker  supports only its default HH:mm format. For the future versions we plan toallow control over the  time  format, as for an example HH:mm tt.

    As for the displayed  time in the textbox  - itis  in HH:mm format for the moment.  You can enter time  inany other format, however, it will be automaticallyconverted to HH:mm. For instance, you can enter 9PM and this time will be converted to 21:00 or 9AM, which will be then converted to 09:00.

    As for the StartTime, EndTime, TimeInterval and  ClockItemSource time formats - RadtimePicker supports TimeSpan objects.Youcan  enter TimeSpan(9,25,10)in the code-behind or “9:25:10” in the XAML. This will be altomatically convertedto 09:25. Itis also possible to enter only hours and minutes in the XAML, like “9:4” that is equal to 09:04.

    Greetings,
    Boryana

    Reply

  • rh Master avatar

    Posted on Oct 2, 2008 (permalink)

    I second the desire to have different time formats. I think the default should use a 12 hour clock with AM/PM and not use military time for default.

    Reply

  • Bobi Bobi admin's avatar

    Posted on Oct 6, 2008 (permalink)

    Hello  Giancarlo Aguilera,

    Thank you for your suggestion. In Q3 we intend to add different time formats support.

    Best wishes,

    Boryana


    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Michael avatar

    Posted on Feb 4, 2009 (permalink)

    Has the AM PM time format been added to the time picker control yet? It is useless without it. Nobody in this country uses military time except the military and the cops.

    Thanks

    Michael


    Reply

  • Bobi Bobi admin's avatar

    Posted on Feb 6, 2009 (permalink)

    Hello Michael,

    We did not make it for Q3 2008. However, the good news is that your requirement will be fulfilled with the forthcoming Q1 release due in March. I hope that this timeframe is acceptable for you.

    All the best,
    Boryana
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Marina Nelson avatar

    Posted on May 28, 2009 (permalink)

    Hello Boryana from the Telerik team,
     
    We are using the Q1 2009 Version of the Telerik Rad Controls and cannot find the property to set the TimePicker to a time display format other than military time. 

    Marina Nelson

    Reply

  • Boyan Boyan admin's avatar

    Posted on Jun 1, 2009 (permalink)

    Hi Marina,

      This behavior is very strange. AM/PM format is based on your PC Culture so you should get AM/PM by default. However you can use the Culture property as follows:
    timepicker.Culture = new System.Globalization.CultureInfo("en-us"); 

    If you set it to English(GB) for example it will be using military time. Unfortunately for now this can't be set through xaml.


    Best wishes,
    Boyan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

    Reply

  • ewart Master avatar

    Posted on Jul 29, 2010 (permalink)

    I have the opposite problem now..  if anyone has any insight into how to easily get a simple HH:MM format without the am/pm I'd really appreciate it.

    http://www.telerik.com/community/forums/silverlight/timepicker/formatting-time-picker.aspx

    cheers
    ewart.

    Reply

  • Kaloyan Kaloyan admin's avatar

    Posted on Jul 30, 2010 (permalink)

    Hi ewart,

    Try setting the RadTimePicker culture property:

    radTimePicker.Culture = new System.Globalization.CultureInfo("en-US")
                {
                    DateTimeFormat = new System.Globalization.DateTimeFormatInfo
                    {
                        ShortTimePattern = "HH:MM", // In case of DisplayFormat="Short"
                        LongTimePattern = "HH:MM" // In case of DisplayFormat="long"
                    }
                };


    Best wishes,
    Kaloyan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > TimePicker > how to control time display format
Related resources for "how to control time display format"

Silverlight TimePicker Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]