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
885
DateTimeEditor Date Change When Edit Mask Is Time Only
posted

I have datetimeeditors configured to display time only for a start and end time. I have code behind the form which compares start to end and if end is earlier (i.e. user enters 10:00 PM start and 2:00 AM finish) then it adds one day to the end time (so 06-14-12 2:00 AM becomes 06-15-12 2:00 AM)..

There is a drop down calendar enabled on the editor. However, if the user opens the drop down calendar and selects a different date (i.e. they meant to enter 10:00 AM and 2:00 PM so they need to reverse the action of the code behind the form) the date in the control's value does NOT change.

How can I allow the user to alter the underlying date using the calendar while only displaying and allowing direct editing of the masked time portion?

Parents
  • 53790
    Verified Answer
    posted

    Hello ellswrth,

    If I understand well your scenario, the mentioned behavior is expected (it is by design) when you are using MaksInput and FormatString to display only the TIME.  If you want to achieve desired behavior maybe you could handle ultraDateTimeEditor1_BeforeDropDown() event and using MonthCalandar. Please take a look at the attached sample and video file for more details and let me know if you have any questions.

    Regards

    UltraDateTimeEditorMaskTime.zip
Reply Children