Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
UltraDateTimeEditor 24h string format
posted

Hi,

I am trying to show time in 24h format, but have system time in 12h format.

I thought to do this using FormatString. Something like "M/dd/yyyy  H:mm:ss" and it works, it shows date/time in correct format, but when I focus DateTime control it changes format to some another (default format according Culture in FormatProvider, or current system culture).

How I can manage this?

(Or) Do you have some better idea?

 

Thank you!

Parents
No Data
Reply
  • 69832
    Verified Answer
    Offline posted

    That control uses our character masking functionality, which is controlled by the MaskInput property. If you specify a time mask with only one "h", it will implicitly use 24-hour representation for times when in edit mode.

Children
No Data