JSFiddle - React, Tailwind, and code Playground
HTML
<script
src="https://code.jquery.com/jquery-1.12.4.js"
integrity="sha256-Qw82+bXyGq6MydymqBxNPYTaUXXq7c8v3CwiYwLLNXU="
crossorigin="anonymous"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<label>date_debut</label><input type="text"name="date_debut" id="datepicker">
</br>
<label>date fin</label><input type="text"name="date_fin"id="datepicker2">
</br>
<label>nombre jour</label><input type="text"name="nombre_jour" id="result">
<button id="button">Calcul</button>
</button>
</br>
CSS
label{
width:120px;
}
JavaScript
$('#datepicker, #datepicker2').datepicker();
$('#button').click(function () {
var start = moment($('#datepicker').val()),
end = moment($('#datepicker2').val());
var diffInDays = end.diff(start,"days");
if(isNaN(diffInDays) != true)
$("#result").val(diffInDays);
});