Validating date with rangevalidator control in Free adult web chats no memberships phoenix
Hi All, We are dynamically adding a range validator to a textbox control from code behind. We have identified that the issue was not with the range validator but in the customization in the way we handle user input.The textbox accepts date inputs and if the date does not fall within the range we determine dynamically, the range validator displays the required message asking the user to enter a value within the determined range. Due to some constraints that can be deemed beyond the scope of this discussion, we had to use hidden drop downs which are populated based on the value selected by the user using an asp calendar control.because for such values, Date.parse() or Date() functions should return null (Is Nan = true), but rather they are having some values. when I try "34/Apr/2009" the result is Is Valid =false... for that reason I do this checks: obj2==dte Date() obj2==dte Month() obj2==dte Full Year() oh!!!!!
The date format might seem a bit weird to you if you're not from Europe, where we use dd-mm-yy.
You can just change it if it doesn't fit the date format on the machine you're working on.
Now, try running the website, and enter a date in our new Text Box.
It's only valid if the date is within 2006, and a cool sideeffect is that the date is also checked for validity.
Have a look at this screenshot, which shows us that the validator reacts to an impossible date as well: And once again, if the clientside validation is not working, it will be catched in our Code Behind, as shown with the Required Field Validator.