Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TimePicker > DateTimeFormat how to remove AM and PM ?

Not answered DateTimeFormat how to remove AM and PM ?

Feed from this thread
  • Andrew avatar

    Posted on Nov 2, 2011 (permalink)

    According to their documentation “Link below” to set their date time picker to military time you have to create a new culture. We are using the culture below, as you can see from the screen shot it got it half way right but I think it would be better without the AM & PM after it.I attached a screen shot of the clock. We just want to remove the AM and PM.

     

    CultureInfo cultureInfo = new CultureInfo("en-US");

    cultureInfo.DateTimeFormat.ShortTimePattern = "H:mm";

    cultureInfo.DateTimeFormat.LongTimePattern = "H:mm";

    cultureInfo.DateTimeFormat.PMDesignator = "";

    cultureInfo.DateTimeFormat.AMDesignator = "";   

     

     

    http://www.telerik.com/help/wpf/raddatetimepicker-features-formatting.html

     

    Attached files

    Reply

  • Ivo Ivo admin's avatar

    Posted on Nov 3, 2011 (permalink)

    Hi Andrew,

    I suspect you do not set RadDateTimePicker's culture:
    CultureInfo cultureInfo = new CultureInfo("en-US");
    cultureInfo.DateTimeFormat.ShortTimePattern = "H:mm";
    cultureInfo.DateTimeFormat.LongTimePattern = "H:mm";
    cultureInfo.DateTimeFormat.PMDesignator = " za";
    cultureInfo.DateTimeFormat.AMDesignator = " az";
    this.RadDateTimePicker.Culture = cultureInfo;

    Regards,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TimePicker > DateTimeFormat how to remove AM and PM ?
Related resources for "DateTimeFormat how to remove AM and PM ?"

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