1

I am using jquery date picker . now i want set mindate as 62 hours but it is taking input only mindate : '3' ie.. means it takes 72 hours . i want only 62 hours . please help me to resolve this issue.thank you in advance i am attaching snap of code.

 <script>
  $(function() {
    $( "#datepicker" ).datepicker({ minDate: 3, beforeShowDay: function(date){   var day = date.getDay();   return [day == 3 ,""];} });
  });
  </script>
4

1 回答 1

2

You can compute the date for now - 62hrs and provide that as a paramter to the datepicker's minDate property

'minDate': new Date(((new Date).getTime() - 62 * 60 * 60 * 1000) )
于 2013-03-30T06:46:16.243 回答