Hi,
$(function() {
var specialDays = {
'2011': {
'3': {
'10': {tooltip: "Some event", className: "holiday"}
},
'4': {
'15': {tooltip: "Some another event", className: "holiday"}
}
}
};
$
('#datepicker').datepicker({beforeShowDay: function(date) {
var d = date.getDate(),
m
= date.getMonth()+1,
y
= date.getFullYear();
if (specialDays[y] && specialDays[y][m] && specialDays[y][m][d]) {
var s = specialDays[y][m][d];
return [true, s.className, s.tooltip]; // selectable
}
return [false,'']; // non-selectable
}});
/* tooltip*/
$
(".ui-datepicker-calendar tbody").tooltip();
});