diff options
author | Keith Wood <kbwood.au@gmail.com> | 2008-06-17 10:08:57 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2008-06-17 10:08:57 +0000 |
commit | b0257a0e1c971f7b1777bd758c2605f13ea22f0e (patch) | |
tree | 817ec0cb99cf61181ce8d618e55f420393bbc9c2 | |
parent | 915d20d43e35cea771bb700e436a9ee861328c9a (diff) | |
download | jquery-ui-b0257a0e1c971f7b1777bd758c2605f13ea22f0e.tar.gz jquery-ui-b0257a0e1c971f7b1777bd758c2605f13ea22f0e.zip |
Fixed 2641 Week row hover styling
-rw-r--r-- | ui/ui.datepicker.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js index 9549712b0..73addbe6d 100644 --- a/ui/ui.datepicker.js +++ b/ui/ui.datepicker.js @@ -1215,6 +1215,7 @@ $.extend(DatepickerInstance.prototype, { var printDate = new Date(drawYear, drawMonth, 1 - leadDays); var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate var beforeShowDay = this._get('beforeShowDay'); + var highlightWeek = this._get('highlightWeek'); var showOtherMonths = this._get('showOtherMonths'); var calculateWeek = this._get('calculateWeek') || $.datepicker.iso8601Week; var dateStatus = this._get('statusForDate') || $.datepicker.dateStatus; @@ -1238,11 +1239,15 @@ $.extend(DatepickerInstance.prototype, { ' ' + $.datepicker._currentClass : '') + // highlight selected day (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different) ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title - (unselectable ? '' : ' onmouseover="jQuery(this).addClass(\'ui-datepicker-days-cell-over\');' + + (unselectable ? (highlightWeek ? ' onmouseover="jQuery(this).parent().addClass(\'ui-datepicker-week-over\');"' + // highlight selection week + ' onmouseout="jQuery(this).parent().removeClass(\'ui-datepicker-week-over\');"' : '') : // unhighlight selection week + ' onmouseover="jQuery(this).addClass(\'ui-datepicker-days-cell-over\')' + // highlight selection + (highlightWeek ? '.parent().addClass(\'ui-datepicker-week-over\')' : '') + ';' + // highlight selection week (!showStatus || (otherMonth && !showOtherMonths) ? '' : 'jQuery(\'#ui-datepicker-status-' + this._id + '\').html(\'' + (dateStatus.apply((this._input ? this._input[0] : null), [printDate, this]) || ' ') +'\');') + '"' + - ' onmouseout="jQuery(this).removeClass(\'ui-datepicker-days-cell-over\');' + + ' onmouseout="jQuery(this).removeClass(\'ui-datepicker-days-cell-over\')' + // unhighlight selection + (highlightWeek ? '.parent().removeClass(\'ui-datepicker-week-over\')' : '') + ';' + // unhighlight selection week (!showStatus || (otherMonth && !showOtherMonths) ? '' : 'jQuery(\'#ui-datepicker-status-' + this._id + '\').html(\' \');') + '" onclick="jQuery.datepicker._selectDay(' + this._id + ',' + drawMonth + ',' + drawYear + ', this);"') + '>' + // actions |