I have to disable the dates between today's date to selected(set) date. Here is my code
$(function () {
$("#departure").datepicker({
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
maxDate: "+5",
minDate: -0
});
$("#departure").datepicker("setDate", "5");
});
<input id="departure" />
here is my screenshot:-
Now I want to diable date 5 6 7 means 3 days after today. please help me.....
Hello I got my answer perfectly, But one issue came if in 5 days,if there is weekends it should be skip so what to do for that any body knows suppose today is 11-6-2013 then 15 and 16 should be skip and 19th date would come.
Here are few good links which can help you:-
http://articles.tutorboy.com/2010/09/03/jquery-ui-datepicker-disable-specified-dates/
http://tokenposts.blogspot.ca/2011/05/jquery-datepicker-disable-specific.html
http://davidwalsh.name/jquery-datepicker-disable-days
http://gauravganoo.com/tips/js/jquery-enable-disable-datepicker/
You can also use multidatespickr
This is my answer Today is 11-6-2013
$("#departure").datepicker({
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
maxDate: "+1y",
minDate: +4,
});
$("#departure").datepicker("setDate", "5");
<input id="departure" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With