We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DateTimeEdit - Handle invalid dates and out of range - DateValidationError

Thread ID:





106349 Dec 31,2012 09:17 PM UTC Jan 22,2013 05:55 AM UTC WPF 2
Tags: Tools
David Rose
Asked On December 31, 2012 09:17 PM UTC

I'm looking to replace my DatePicker with the DateTimeEdit and I can't seem to find a analog to the DateValidationError event.

In other words, I need to be able to have a method called to display "Invalid Date" or "Date too early" or "Date too late" message to the user if the condition occurs.


David Rose
Replied On December 31, 2012 09:36 PM UTC

Also, I'd like to be able to say "2/31/2012 is not a valid date". So I need to access the original entered value.

Jegan Raj M [Syncfusion]
Replied On January 22, 2013 05:55 AM UTC

Hi David,

Sorry for the delay in getting back to you.

We have created a sample based on your requirement and you can download the sample from the below link.

In this sample, we have created the custom property Date to validate the DateTime in DateTimeEdit control through ValidatesOnDataErrors in binding and we have overriden the Validation border while DateTimeEdit control get focused by custom style which collapsed the FocusBorder and gives the validation style as you have required.

Please let us know if you have any queries.

Jegan Raj M



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon