From a911f975fab759fcc5458fa3fdb134b8620ed5b7 Mon Sep 17 00:00:00 2001 From: Gerald Simane Date: Tue, 16 Jun 2009 05:26:54 +0000 Subject: [PATCH] --- cis/private/profile/zeitsperre_resturlaub.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index d7e4372ec..0e211de34 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -114,6 +114,13 @@ function checkdatum() Datum=document.getElementById('vondatum').value; Tag=Datum.substring(0,2); Monat=Datum.substring(3,5); + if (parseInt(Monat,10)<1 || parseInt(Monat,10)>12) + { + alert('Von-Datum Monat'+ document.getElementById('vondatum').value+ ' ist nicht richtig.); + document.getElementById('vondatum').focus(); + return false; + } + Jahr=Datum.substring(6,10); vonDatum=Jahr+''+Monat+''+Tag; @@ -121,11 +128,19 @@ function checkdatum() Datum=document.getElementById('bisdatum').value; Tag=Datum.substring(0,2); Monat=Datum.substring(3,5); + if (parseInt(Monat,10)<1 || parseInt(Monat,10)>12) + { + alert('Bis-Datum Monat'+ document.getElementById('bisdatum').value+ ' ist nicht richtig.); + document.getElementById('bisdatum').focus(); + return false; + } + Jahr=Datum.substring(6,10); bisDatum=Jahr+''+Monat+''+Tag; - if (vonDatum>bisDatum) { + if (vonDatum>bisDatum) + { alert('Von-Datum '+ document.getElementById('vondatum').value+ ' ist groesser als das Bis-Datum '+document.getElementById('bisdatum').value); document.getElementById('vondatum').focus(); return false;