Reputation: 47
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>
Upvotes: 1
Views: 2070
Reputation: 99620
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) )
Upvotes: 2