c# - How do I stop a DateTime validator from padding? -
I have a simple validator, which should be checked whether the date format is incorrect. I am testing and entering 2/14/2016 ... which was passed through my verifier as 2/14/02, how can I stop it and e. ISID = false ;;
Protected Zero range Val (Object Sender, Server Validate Eventers E) {Date DateTime Check = TCTD1. Text. Rim (); Choose date time; If (DateTime TryParse (dateCheck, select out) e.IsValid = true; Else e.IsValid = false; }
Should there be a string instead of the date of the date?
If only the dates are> 1900 valid, you can try:
if (datetime trippers (date check, out selection) & amp; Date check> default (date time) e. IsValid = true; Else e.IsValid = false;
And who can fulfill your requirement.
Comments
Post a Comment