JSFiddle - React, Tailwind, and code Playground
by rjha999
HTML
Date1: <input type="date" id="date1">
<br>
Date2:<input type="date" id="date2">
<button onclick="CheckDateDifference()"> GEt Difference</button>
JavaScript
function CheckDateDifference() {
var date1 = $('#CostMaster_labour_deallocationdate1').val();
var date2 = $('#CostMaster_labour_deallocationdate').val();
var diff = Math.round((date1 - date2 ) / 1000 / 60 / 60 / 24);
return diff;
};