asp.net - jquery datepicker max date min date control using two date picker -
what have : have 2 datepicker calender control in jquery 1st can choose date current date , previous date not future date have written code works fine
<script type="text/javascript"> $(function () { $("#from").datepicker({ maxdate: 0 }); }); </script> now have use textbox datepicker can select dates between date selected in 1st textbox , current date.
now having these conditions code should write second datepicker.
my project in asp .net using c#. appreciated
please try below:
<script type = "text/javascript"> $(function () { $("#from").datepicker({ onselect: function (date) { $("#to").datepicker("option","mindate", date); $("#to").datepicker("option","maxdate", new date()); }, maxdate: 0 }); }); </script>
Comments
Post a Comment