Validation is defaulting a datepicker field to 1970-01-01
I've raised this issue in the following forum post:
http://www.webassist.com/forums/posts.php?pid=225745
...but thought that it would be useful to mention it here.
WA Server Validation is defaulting the value in a datepicker field to 01-01-1970 when validation fails on any field.
This is the datepicker field...
<input type="text" class="form-control" name="DOB" id="DOB" placeholder="Date of Birth" maxlength="10" value="<?php echo(isset($_GET['v1'])?ValidatedField("healthscreeningform_984","DOB"):$rsEDITFORM->getColumnVal("SMCformDOB")?date("d-m-Y",strtotime($rsEDITFORM->getColumnVal("SMCformDOB"))):"") ?>" required>
This is the datepicker JS...
<script>
$(function () {
$("#datepicker").datepicker({
dateFormat : 'dd-mm-yy',
changeMonth : true,
changeYear : true,
yearRange: '-100y:c+nn',
maxDate: '-1d'
});
});
</script>
Would appreciate help with this as customers aren't noticing it and, therefore, everyone is submitting the same date of birth! :S
Thank you.
NJ