Validating dd/MM/yyyy text boxes

Validating dd/MM/yyyy text boxes

Post by Rod » Sat, 08 Mar 2003 11:30:15



I am using a CompareValidator to validate a text box for
valid date input. However, all of our users are in Canada
and enter the dates in dd/MM/yyyy format. I've tested the
validator with dates such as 13/02/2003 and it returns
invalid. Could anyone help?
Thanks,
Rod.
 
 
 

Validating dd/MM/yyyy text boxes

Post by Socrates dot Ne » Sat, 08 Mar 2003 12:05:19



Quote:> I am using a CompareValidator to validate a text box for
> valid date input. However, all of our users are in Canada
> and enter the dates in dd/MM/yyyy format. I've tested the
> validator with dates such as 13/02/2003 and it returns
> invalid. Could anyone help?
> Thanks,
> Rod.

Check out this posting:
http://dotnet247.com/247reference/msgs/20/101897.aspx .

 
 
 

Validating dd/MM/yyyy text boxes

Post by Rod » Sat, 08 Mar 2003 12:32:03


Thank you very much.
I did a bit more research on that info and you can also
add the following to the system.config file:

<system.web>

<globalization culture="en-CA" uiCulture="en-CA"
requestEncoding="utf-8" responseEncoding="utf-8" />

</system.web>

Just another way, if anybody is curious.

Quote:

>Check out this posting:
>http://dotnet247.com/247reference/msgs/20/101897.aspx .

>.

 
 
 

1. Date, changing mm/dd/yy to dd/mm/yy

I need to change the International settings in Visual Interdev to
English(Ireland) or English(UK).
There are only 2 options available:
English(United States) and
Same as Microsoft Office, which is set to English(Ireland), but Interdev
sees it as English(United STates) for some reason.

Help!  

2. comp.os.msdos.programmer FAQ part 1/5

3. ASP.NET , saving DD/MM/YYYY format dates to Access/SQl database

4. Best way to copy music CD's ?

5. ISO 8601 yyyy-mm-dd format validation

6. Novell and PPP

7. date validation "dd-mm-yyyy" ???

8. Multiple postings - An apology from Ian Crosby

9. sort on a dt field - need yyyy/mm/dd format?

10. DateTime.Now to yyyy-mm-dd

11. How to parse yyyy/MM/dd datetime ?

12. ASP.NET - Error with dates: 37/10/aaaa - dd/mm/yyyy --> dd/mm/aaaa in spanish

13. MMM/dd/yyyy Date format problem