Range of valid dates generated by jQuery UI DatePicker
I am using the date picker provided by jQuery UI to select a date range that ends with a single text input with something like 11/11/2008 - 12/05/2008. What would you recommend as soon as possible (jQuery / JavaScript) on the client side as well as some server side validation code (ASP.NET/C#) to make sure the user is entering the correct dates?
Note I asked a stack overflow question the other day about how to parse two dates using C # if you're interested.
source to share
CustomValidator . It should be fairly straightforward to split them into two separate dates, parse each and compare if necessary to check if the range is correct.
source to share
You compare dates easily with javascript, just convert the inputs to Date objects and then any comparator will work. I am using Date.js as it has a great parser. On the backend I would assume you can do the same, the key is to convert all of your objects to the same type and one that can be compared to another.
source to share