Can someone welp me to change the following function,to coonect to MSSQl database,what I want is to select dates from MSSQl,not in the script as it is now.
<script type=”text/javascript”>
$(function() {
// format: specialDays.year.month.day
var specialDays = {
‘2010’: {
‘1’: {‘1’: {tooltip: “New Year’s Day”, className: “holiday”}},
‘3’: {
’21’: {tooltip: “Human Rights Day”, className: “holiday”},
’22’: {tooltip: “Public Holiday”, className: “holiday”}
},
‘4’: {
‘2’: {tooltip: “Good Friday”, className: “holiday”},
‘4’: {tooltip: “Easter Sunday”, className: “holiday”},
‘5’: {tooltip: “Family Day”, className: “holiday”},
’27’: {tooltip: “Freedom Day”, className: “holiday”}
},
‘5’: {‘1’: {tooltip: “Workers Day”, className: “holiday”}},
‘6’: {
’16’: {tooltip: “Youth Day”, className: “holiday”}},
‘8’: {‘9’: {tooltip: “Women’s Day”, className: “holiday”}},
‘9’: {’24’: {tooltip: “Heritage Day”, className: “holiday”}},
’12’: {
’16’: {tooltip: “Day of Reconciliation”, className: “holiday”},
’25’: {tooltip: “Christmas Day”, className: “holiday”},
’26’: {tooltip: “Day of Goodwill”, className: “holiday”},
’27’: {tooltip: “Public Holiday”, 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];
}
return [true,”]; // no change
}});
});
</script>