Index: ui.datepicker.js =================================================================== --- ui.datepicker.js (revision 927) +++ ui.datepicker.js (working copy) @@ -42,6 +42,7 @@ this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class this._weekOverClass = 'ui-datepicker-week-over'; // The name of the week hover marker class + this._holidayClass = 'ui-datepicker-holiday'; // The name of the holiday class this.regional = []; // Available regional settings, indexed by language code this.regional[''] = { // Default regional settings clearText: 'Clear', // Display text for clear link @@ -130,6 +131,7 @@ rangeSeparator: ' - ', // Text between two dates in a range altField: '', // Selector for an alternate field to store selected dates into altFormat: '', // The date format to use for the alternate field + holidays: [], // list of timestamp for national holidays e.g. [ new Date(2008,1-1,1,).getTime()] constrainInput: true // The input is constrained by the current date format }; $.extend(this._defaults, this.regional['']); @@ -1436,6 +1438,7 @@ var dateStatus = this._get(inst, 'statusForDate') || this.dateStatus; var endDate = inst.endDay ? new Date(inst.endYear, inst.endMonth, inst.endDay) : currentDate; var defaultDate = this._getDefaultDate(inst); + var holidays = this._get(inst, 'holidays'); for (var row = 0; row < numMonths[0]; row++) for (var col = 0; col < numMonths[1]; col++) { var selectedDate = new Date(drawYear, drawMonth, inst.selectedDay); @@ -1487,6 +1490,7 @@ (otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range ' ' + this._currentClass : '') + // highlight selected day + (jQuery.inArray(printDate.getTime(), holidays) > -1 ? ' ' + this._holidayClass + ' ' : '') + // holiday (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different) ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title (unselectable ? (highlightWeek ? ' onmouseover="jQuery(this).parent().addClass(\'' + this._weekOverClass + '\');"' + // highlight selection week