dotnetmonitor.com |
|
|||||||||||
| Use the MaskedTextBox's TypeValidationCompleted
event. This event occurs when the MaskedTextBox loses focus and the static
Parse method on the Type set into the ValidatingType proeprty is called.
The IsValidInput property on the TypeValidationEventArgs returns true if the Parse method succeeded. The ReturnValue property on the TypeValidationEventArgs returns the instance created by the Parse method.
You can then use the DateTime.Compare method to verify the DateTime is within a range. |
|||||||||||