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
380
Time format with DatetimeEditor
posted

Hi,

 How to get Just a time format with DateTimeEditor?

I've tried to put FormatString in "t" but i get 01/01/2008 00:00:00
I've tried to put MaskInpu to {time} i get the same result...

Please help.

Thanks

Parents
  • 10880
    posted

    As you mentioned setting the MaskInput to {time} should get the behavior you are looking for.  If you only set the FormatString property, the the time will display only when the control is in edit mode (when the cursor is in the control).  I tested with Visual Studio 2005 and NetAdvantage 2007 Volume 3, 7.3.20073.38, and did not have any issues.  Are you possibly using Visual Studio 2008 with a version prior to NA 2008 Volume 1?

    I would not use the DateTimeEditor if all you are interested in is time.  It is more of a date chooser then a time picker. 

    Instead, use a UltraMaskEdit control.  Set the EditAs property to DateTime and InputMask to {time}. 

Reply Children