überprüfen, ob ein datums-value leer ist eingepflegt
authorThomas Kasulke <t.kasulke@linet-services.de>
Fri, 20 Apr 2007 10:35:14 +0000 (10:35 +0000)
committerThomas Kasulke <t.kasulke@linet-services.de>
Fri, 20 Apr 2007 10:35:14 +0000 (10:35 +0000)
js/common.js

index dd0e0ec..15a5071 100644 (file)
@@ -80,6 +80,9 @@ function check_right_number_format(input_name) {
 }
 
 function check_right_date_format(input_name) {
+  if(input_name.value == "") {
+    return true;
+  }
   var matching = new RegExp(dateFormat.replace(/\w/g, '\\d') + "\$","ig");
   if(!(dateFormat.lastIndexOf("y") == 3) && !matching.test(input_name.value)) {
     matching = new RegExp(dateFormat.replace(/\w/g, '\\d') + '\\d\\d\$', "ig");