Here i would like to share how to exclude recurrent day from jQuery UI datepicker, Because in some case of web application like online booking, forms are having datepickers, mostly jquery ui datepicker.Here we need to do some manipulation for customizing date picker, Especially exclude recurrent day from datepicker.
We have already seen that how to exclude single date from date picker. There you can get detailed description about jQuery datepicker.So here we go for sample code.
Sample code for exclude recurrent day
var excludedays = { "recurrent_day": [0]}; $('#caleder').datepicker({ beforeShowDay: function(date){ if(recurrent_day(date)){ return [false]; } return [true]; } }); function recurrent_day(date){ return ($.inArray(date.getDay(),excludedays.recurrent_day) > -1); }
I hope this article helps someone.
Pingback: jQuery datepicker exclude date - Code Cocktail