Validating Date Range Produced By jQuery UI DatePicker

I am using the date picker provided by jQuery UI to select a date range that ends up in a single text input with something like 11/11/2008 - 12/05/2008. What would you recommend as far a validation (jQuery/JavaScript) on the client side as well as code for validation on the server side (ASP.NET/C#) to make sure the user enters valid dates?

Note I asked a question on Stack Overflow the other day about how to parse out the two dates using C# if your interested.


CustomValidator. Should be fairly simple to split these into two separate dates, parse each, and compare as necessary to verify the range is correct.

You can compare Dates with javascript fairly easily, just convert inputs to Date objects, and then any comparator would work. I use Date.js, as it has an excellent parser. On the backend, I would assume that you can do the same thing, the key is to convert all your objects to the same type, and one that can be compared to another.

Need Your Help

java not found after install but java programs run

java java-7

I updated my java to JDK 7 today and after installing I can run java programs and eclipse runs fine but says no working java detected. Also Minecraft w...

How to send newsletters from different IPs?

php email unix data-structures massmail

I am working on a business marketing website. The criteria is that we have to send around 80 000 (say) newsletters per day on different email-ids. But my hosting company allowed me to send only 10 ...