Non-Military Time Format

6 posts, 0 answers
  1. mark connell
    mark connell avatar
    2 posts
    Member since:
    Nov 2008

    Posted 02 Dec 2008 Link to this post

    Hi, is there any way to use a AM/PM format for the time picker?  The current military format isn't the most desirable option for our application.

    Thanks in advance!

  2. Bobi
    Bobi avatar
    513 posts

    Posted 04 Dec 2008 Link to this post

    Hi mark connell,

    The most recent version of RadTimePicker displays time in format that depends on CultureInfo.CurrentCulture. So to display time in AM/PM format you will need to set CurrentCulture to a format that has AM/PM. For the future versions of the control we have plans to support multiple time formats without dependency on CurrentCulture.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft R3 2016 release webinar banner
  4. mark connell
    mark connell avatar
    2 posts
    Member since:
    Nov 2008

    Posted 09 Dec 2008 Link to this post

    Thanks for the reply.  However, I am getting an error when I select a culture in Expression Blend 2.  Here is the XAML that is generated when I select English (United States) from the list of available culture options:

            <telerikInput:RadTimePicker HorizontalAlignment="Left" Margin="8,0,0,27" x:Name="PickerStartTime1" VerticalAlignment="Bottom" Width="Auto" Grid.Column="1" SelectedTime="06:00:00" StartTime="00:00:00" TimeInterval="00:30:00" d:LayoutOverrides="HorizontalAlignment, Height">
                <System_Globalization:NumberFormatInfo CurrencyDecimalDigits="2" CurrencyDecimalSeparator="." CurrencyGroupSeparator="," CurrencyNegativePattern="0" CurrencyPositivePattern="0" CurrencySymbol="$" DigitSubstitution="None" NaNSymbol="NaN" NegativeInfinitySymbol="-Infinity" NegativeSign="-" NumberDecimalDigits="2" NumberDecimalSeparator="." NumberGroupSeparator="," NumberNegativePattern="1" PerMilleSymbol="‰" PercentDecimalDigits="2" PercentDecimalSeparator="." PercentGroupSeparator="," PercentNegativePattern="0" PercentPositivePattern="0" PercentSymbol="%" PositiveInfinitySymbol="Infinity" PositiveSign="+"/>
                <System_Globalization:DateTimeFormatInfo AMDesignator="AM" CalendarWeekRule="FirstDay" DateSeparator="/" FirstDayOfWeek="Sunday" FullDateTimePattern="dddd, MMMM dd, yyyy h:mm:ss tt" LongDatePattern="dddd, MMMM dd, yyyy" LongTimePattern="h:mm:ss tt" MonthDayPattern="MMMM dd" PMDesignator="PM" ShortDatePattern="M/d/yyyy" ShortTimePattern="h:mm tt" TimeSeparator=":" YearMonthPattern="MMMM, yyyy">
                  <System_Globalization:GregorianCalendar CalendarType="Localized" TwoDigitYearMax="2029"/>

    The Description of the Error is: Cannot create an instance of "CultureInfo".

    Any ideas?  Thanks again in advance!
  5. Hristo
    Hristo avatar
    832 posts

    Posted 15 Dec 2008 Link to this post

    Hi Mark,

    Silverlight parser doesn't support creation of NumberFormatInfo in XAML. The only way that you could set it is from the code. We can only hope that this will be fixed in the next Silverlight version.

    Sorry for the troubles.

    Kind regards,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Allan Zhou
    Allan Zhou avatar
    1 posts
    Member since:
    Jul 2009

    Posted 07 Jul 2009 Link to this post


    I'm still have the same problem to show the time with AM/PM. I set the Culture to "en-US", and it shows correctly when the page shows up(like 6:00AM, 6:00PM). My problem is, I have to reset the selectedTime to be a computed value, I do like this:

    this.timePicker.SelectedTime = new TimeSpan(22,0,0);

    Then it shows without AM/PM, how do I let them show AM/PM after setting the values?


  7. Kaloyan
    Kaloyan avatar
    920 posts

    Posted 09 Jul 2009 Link to this post

    Hello Allan Zhou,

    Thank you for reporting the issue. The problem you are facing is due to the fact that you have a very old version of the RadControls for Silverlight. I suggest you try to download the latest official Q2 2009 release and give it a go.

    Let us know how this goes.

    Best wishes,
    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.
Back to Top
DevCraft R3 2016 release webinar banner