Max Min dates not validating
Hi
I've installed a date picker and then trying to validate this to a period of +1 to +31 days following system date.
The date picker works ok and return a valid YYYY-mm-dd result.
Whe I validate the page keeps returning to same page suggetsing an error. If I remove the validation the page passes to the following page on submit.
The code WA has written into the page is:
if (isset($_POST["postp2"])) {
$WAFV_Redirect = "";
$_SESSION['WAVT_proposalsPostpone_198_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateDT(((isset($_POST["postp"]))?$_POST["postp"]:"") . "",true,".*","mktime(0, 0, 0, date(\"m\") , date(\"d\")+1, date(\"Y\"));","mktime(0, 0, 0, date(\"m\") , date(\"d\")+31, date(\"Y\"));",true,".*","","",true,2);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"proposalsPostpone_198");
}
}
?>
I'm using a php page, from a template, date picker inserted by removing the lock and reinstalling after inserting the date picker.
Dates are always a nightmare - but can you see what I've done wrong please.
Thanks