Hmm, here's a thing.
I have a date which is passed in a form (dd/mm/yyyy). I need to compare this to today's date using javascript.
Now, this works on my development machine but not on my live web server. I haveCode:<script language="javascript"> function somefunction() { var renewdate = document.frm.renewdate.value; var today = new Date() renewdte = Date.parse(renewdate) todaysdte = Date.parse(today) thedate = today.getDay(); if (renewdte < todaysdte) { alert("The date of your renewal has passed"); return false; } } </script>
In the page that contains the form but the live web server is taking the renewal date 01/10/2005 in the US format 10/01/2005.Code:<%setLocale(2057)%>
And it's proper doing my head in!
Any clues?




Reply With Quote