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
1655
Bypass DateTimeEditor error
posted
Hi, When i type '00:00:0000' in my DateTimeEditor i get the error message "Value is invalid. Please enter a valid value." I do not want to get this message. I used e.Handled = false; in XamDateTimeEditor_EditModeValidationError event. But that did not work. Can you please help me on this?
Parents
No Data
Reply
  • 54937
    Offline posted

    I can't tell from your description exactly what is going on (i.e. why the error is occurring) but to answer your specific question - the InvalidValueBehavior property of the event arguments determines what action is taken. This property defaults based on the resolved InvalidValueBehavior property which ultimately defaults to DisplayErrorMessage. You should set this property on the event arguments of that event to one of the other values if you do not want to display an error message. You can also set the ErrorMessage property to null or a 0 length string to avoid the message box.

Children
No Data