![]() |
| ||
| problem with date validation Hello everyone, I am facing a problem with the start date and the end date.I have to do a validation such that the end date entered with the date picker should be equal to or greater than the start date.I have written the following code but it is not helping me out.Here is the code of javascript <script language="javascript">The html code is as follows. start date <input readonly type="Text" id="start" name="timestamp" size = "20" value="">End date <input readonly type="Text" id="end" name="timestamp1" size = "20" value="">The problem is that the validation is done only for days but not for the month and year.If you enter the start date as dd/mm/yyyy 12/8/2008 and End date as 11/8/2008 it will give an alert box but if you enter start date as 12/8/2008 and end date as 09/8/2008 than the form is submitted it is not validating. Please anyone can find a solution for this. thanks in advance. |
| ||
| problem with date validation Hello. Is there no one who could solve my problem regarding the date validation. I am still waiting for a reply from someone who could help me out of this. Please give a response. |
| ||
| Re: problem with date validation You're trying to compare strings as if they were numbers ... that will give you unreliable results at best. To compare as numbers you should do something like this ... <script type="text/javascript"> I haven't actually tested the above script, so there might be some hidden (or not so hidden) hitch in it, but that type of thing is what you're looking for -- I believe. Good luck |
| All times are GMT -4. The time now is 9:18 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC