I am having basic issues when trying to get the date from two calender selections and put them into the below calculation.
Anyone have a solution?
Thanks Iain
<body>
<h1>Project Details</h1>
<h3>Please enter the project Notice to Proceed (NTP) date: <input id="NtpDate" type= "date" name="NtpDate"></h3>
</br>
<h3>Please enter the Report date: <input type= "date" name="ReportDate"> </h3>
<script type="text/javascript">
// I would like to replace this with the <input type = date> tags ...var NtpDate = new Date("7/11/2004");
// I would like to replace this with the <input type = date> tags ... var ReportDate = new Date("12/12/2010");
var timeDiff = Math.abs(ReportDate.getTime() - NtpDate.getTime());
var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
//alert(diffDays);
document.write("Period =" + diffDays + " (Days from NTP)");
</script>`
</body>