I use this https://github.com/behzadi/persianDatepicker script to show jalali date
I select date1 and date2 to from datepicker to my input
Code
<script>
$(document).ready(function() {
$('.example').persianDatepicker({
format: 'YYYY/MM/DD',
observer: true,
altField: '.observer-example-alt',
autoClose: true,
});
});
</script>
<input id="start-date" class="example" name="start-date"/>
<input id="end-date" class="example" name="end-date"/>
<input id="diff" class="example" name="diff"/>
I want when I select date1 (id=”start-date”) and date 2 (id=”end-date”) it will immediately display in (id=”diff”) the difference between the two jalali dates
for example 1
date1= 1403/06/06
date2= 1403/06/06
result:
1 day
example 2
date1= 1403/06/06
date2= 1403/06/07
result:
2 days
i dont add what add in my javascript to earn my result
<script>
??????
??????
</script>