By Kamil123 - Mon Apr 04, 2016 4:58 am
- Mon Apr 04, 2016 4:58 am
#785006
Hello,
I write the below Javascript to Subtract two date fields "Date_End" and "Date_Start", and its working fine in IE, but in FireFox the script is not running
Any suggestion, please
Thanks
I write the below Javascript to Subtract two date fields "Date_End" and "Date_Start", and its working fine in IE, but in FireFox the script is not running
Any suggestion, please
Thanks
Code: Select all
function calcDiff() {
var date1 = new Date(getField("Date_End").value);
var date2 = new Date(getField("Date_Start").value);
var timeDiff = Math.abs(date2.getTime() - date1.getTime());
var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
getField("Diffrance_Date").value = diffDays;
}