I have script which works well in Chrome and Firefox, but when tried same with Safari version 5.1.7 which could be latest for windows showing NAN values can anybody help me out to solve this problem I tried of parseInt but it didn't work.
here is my code;
var date1 = new Date($('#arrival').val());
var date2 = new Date($('#departure').val());
var timeDiff = Math.abs(date2.getTime() - date1.getTime());
var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
//parseInt("0"+$(this).html(),10)
diffDays=parseInt(diffDays);
console.log('Selected diffDays: '+diffDays);
the comment part of parseint shows me 0's.