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
400
UltraDateTimeEditor not getting the time when selecting the date
posted

Hi,

I'm using the ultraDateTimeEditor in my form. I put the mast input = {date}  {time}. But the case is when I select a date from the drop down it only displays the selected date and the time is always 12:00:AM. I need the present time to display there irrespective of the date selected. What can I do to obtain this?

Any help will be appriciated.

With Regards,

SreeRam.

Parents
No Data
Reply
  • 390
    Offline posted

    I realize this is a fairly old post, however I just encountered the issue for the first time.  Below is some vb code that is a work around - presented to save someone else the time.  This preserves the date selected by the user, but replaces the time with the current time (Now).

            ' myDateTimeEditor is an UltraDateTimeEditor control
            Dim dteDateTime As Date
            Dim strDateTime As String
            dteDateTime = DateTime.Now
            strDateTime = myDateTimeEditor.DateTime.ToShortDateString + " " +                    dteDateTime.ToLongTimeString
            myDateTimeEditor.Value = DateTime.Parse(strDateTime)

Children
No Data