Without seeing your markup or knowing what will later be done (the entire script) with the date, if anything, it is very hard to say. Consider this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Reform Date - Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function reformDate(dateString){
var dateAr=dateString.split('/')
return dateAr[1]+'/'+dateAr[0]+'/'+dateAr[2]
}
</script>
</head>
<body>
<input type="text" value="05/25/62" onclick="this.value=reformDate(this.value)">
</body>
</html>
Please post a link to the page on your site that contains the problematic script so we can check it out.
Bookmarks