Faiq Adam Faiq Adam - 7 months ago 25
Javascript Question

Datepicker jquery - How to skip next 5 days

I create delivery order, when user select the date
Don't show next 5 days & Weekends

Here is code for don't show Weekends, how to hide next 5 days?

<script>
jQuery(function() {
jQuery("#date").datepicker( {
minDate: +1,
maxDate: '+2M',
beforeShowDay: jQuery.datepicker.noWeekends
});
});



Answer

minDate: "+6D", will hide the next 5 days from the current date. It does take into account weekends already being hidden though, I don't believe. If that is your desired outcome, this gets a whole lot deeper.

Min/Max Date Docs

Comments