Hi all
Trying to add 13 weeks or 91 days to a user entered date.
I’ve got an onBlur event on the field in question, but i’m not having much joy with the calc. Can anyone assist.
Thanks.
<script type=”text/javascript”>
// ———————————————————
// Function to Decision Due Date based on 13 weeks from
// Date Registered (dd/mm/yy)
// ———————————————————
function doCalcDecDue() {
// retrieve values
vardoc = document.forms[“FormData”];
var dateReg = new Date();
dateReg = vardoc.txtPlanReg.value;
// perform calculations
calcDate = dateReg + 91;
// update density field
vardoc.txtPlanDue.value = calcDate;
}
// ———————————————————
</script>