|
Subject:
|
Problem with validation technique of DTPicker.
|
|
Posted By:
|
abhioak
|
Post Date:
|
2/20/2006 11:11:58 PM
|
I have a form, which contains a DTPicker and an 'Apply Time' command button. I have set the custom format of the DTPicker to "MM/dd/yyyy HH:mm:ss". The functionality i require is that if the date here is changed the button should get activated.
I already have completed this requirement by enabling the button through the 'Change' event of the DTPicker control. But i observed that if i change the existing date to an invalid date, say for e.g. - 02/36/2006, the DTPicker pauses for almost 2 seconds, during which it validates the date and then if found invalid, it resets the original date back to the DTPicker. In this event, the change event of DTPicker is not called, therefore, the button is not enabled. This is also fine.
But now i want to display a message to the user that he has entered an invalid date when the DTPicker resets the date after validation. I checked out all the events of the DTPicker,but could not locate one which was getting called after / before the value of DTPicker was validated and reset if invalid.
Please do recommend me a solution for this problem.
|
|