How i can use beforeShowDay for highlighting days in jQuery UI datepicker. I have the following date array
Array
(
[0] => 2011-07-07
Found the most voted answer not working. Updated the code little bit to make it working. $.inArray() mostly search for indexOf(). Also we can't compare two dates directly for equality. Reference : Compare two dates with JavaScript
function inArrayDates(needle, haystack){
var found = 0;
for (var i=0, len=haystack.length;i
And update the accepted function as
if(inArrayDates(date, markDates) != -1) {
return [true, 'selected-highlight', 'tooltip here'];
} else {
return [true, '', ''];
}