<script type="text/javascript" src="js/jquery.ui.datepicker-tr.js"> </script> <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="js/jquery.flexslider-min.js"></script> <script type="text/javascript" src="js/calendar1.js"></script> <script type="text/javascript" src="js/Calendar2.js"></script> <script type="text/javascript"> $(function () { $("#<%= TextBox1.ClientID %>").datepicker({ minDate: 0, maxDate: '+1Y+6M', onSelect: function (dateStr) { var min = $(this).datepicker('getDate'); // Get selected date $("#<%= TextBox2.ClientID %>").datepicker('option', 'minDate', min || '0'); // Set other min, default to today }}); $("#<%= TextBox2.ClientID %>").datepicker({ minDate: '0', maxDate: '+1Y+6M', onSelect: function (dateStr) { var max = $(this).datepicker('getDate'); // Get selected date $('#datepicker').datepicker('option', 'maxDate', max || '+1Y+6M'); // Set other max, default to +18 months var start = $("#<%= TextBox1.ClientID %>").get(); var end = $("#<%= TextBox2.ClientID %>").get(); var diff = new Date(end - start); var days =Math.abs( diff / (1000 * 60 * 60 * 24)); $("#<%= TextBox3.ClientID %>").val(days); }}); }); </script>
var start = $("#TextBox1").datepicker("getDate"); var end = $("#TextBox2").datepicker("getDate"); var days = (end - start) / (1000 * 60 * 60 * 24);
diff
Date
var days =Math.abs( diff.getMilliseconds() / (1000 * 60 * 60 * 24));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)