how to control time display format

10 posts, 0 answers
  1. Giancarlo Aguilera
    Giancarlo Aguilera avatar
    22 posts
    Member since:
    Nov 2006

    Posted 02 Sep 2008 Link to this post

    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
  2. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 03 Sep 2008 Link to this post

    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
  3. DevCraft banner
  4. rh
    rh avatar
    193 posts
    Member since:
    Jan 2007

    Posted 02 Oct 2008 Link to this post

    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.
  5. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 06 Oct 2008 Link to this post

    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.
  6. Michael
    Michael avatar
    29 posts
    Member since:
    Sep 2008

    Posted 04 Feb 2009 Link to this post

    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


  7. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 06 Feb 2009 Link to this post

    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.
  8. Marina Nelson
    Marina Nelson avatar
    1 posts
    Member since:
    May 2009

    Posted 28 May 2009 Link to this post

    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
  9. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 01 Jun 2009 Link to this post

    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.
  10. ewart
    ewart avatar
    221 posts
    Member since:
    Jan 2007

    Posted 29 Jul 2010 Link to this post

    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.
  11. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 30 Jul 2010 Link to this post

    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
Back to Top
DevCraft banner