I am parsing an integer out of a string to get the selected day and month...for some reason 08 and 09 when parsed go to 0 whereas every other number I've tried works fine.
I whipped up this little sample so you can try it yourself. Am I grossly overlooking something?
Code: Select all
<script>
field = "07/09/2004";
curDate = field.split("/");
curMon = parseInt(curDate[0]);
curYear = parseInt(curDate[2]);
curDay = parseInt(curDate[1]);
alert(curDate[0]);
alert(curMon);
</script>but this
Code: Select all
<script>
field = "08/09/2004";
curDate = field.split("/");
curMon = parseInt(curDate[0]);
curYear = parseInt(curDate[2]);
curDay = parseInt(curDate[1]);
alert(curDate[0]);
alert(curMon);
</script>any ideas?