my requirements is as follows;
If date of the datepicker matches the passed dates using array, then it should show hello on hover over and else show sold. I tried the following code
var rateArray = [new Date(2014, 1, 1), new Date(2014, 1, 2)]; // just some dates.
var date = new Date();
$(document).ready(function () {
$("#test").datepicker({
beforeShowDay: function (date) {
if ($.inArray(date, rateArray)) {
return [true, 'tiptip', 'hello'];
}
else {
return [false, 'tiptip', 'Sold'];
}
}
});
});
But it is not working, it is showing "hello" on every date. If anybody know the solution then please help, thanks.