diff --git a/qanda.php b/qanda.php index 935e564e713..0c148734fbd 100644 --- a/qanda.php +++ b/qanda.php @@ -1695,8 +1695,11 @@ function do_date($ia) $maxyear='2020'; } + $goodchars = str_replace( array("m","d","y"), "", $dateformatdetails['jsdate']); + $goodchars = "0123456789".$goodchars[0]; + $answer ="

- gT('Date picker')."\" size=\"10\" name=\"{$ia[1]}\" id=\"answer{$ia[1]}\" value=\"$dateoutput\" maxlength=\"10\" onkeypress=\"return goodchars(event,'0123456789-')\" onchange=\"$checkconditionFunction(this.value, this.name, this.type)\" /> + gT('Date picker')."\" size=\"10\" name=\"{$ia[1]}\" id=\"answer{$ia[1]}\" value=\"$dateoutput\" maxlength=\"10\" onkeypress=\"return goodchars(event,'".$goodchars."')\" onchange=\"$checkconditionFunction(this.value, this.name, this.type)\" />