日付8桁入力で日付フォーマットに
下記サンプルにて実行

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="GENERATOR" content="JustSystems Homepage Builder Version 16.0.1.0 for Windows">
<script type="text/javascript">
<!--
function hiduke_conv(s) {
var str = s.value;
var n = str.length;
if(n == 8) {
t = str.substr(0,4) +"-"+ str.substr(4,2) + "-" +str.substr(6,2);
s.value = t;
}
}
-->
</script>
<title></title>
</head>
<body>
文字が8文字入ったら、日付だと確信して4桁、2桁、2桁に区切りスラッシュを入れる。
<br>
<input type="text" name="inpdate" value="" size="10" maxlength="12"
onChange="hiduke_conv(this)"><br>

</body>
</html>

????