aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2009-01-07 16:55:50 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2009-01-07 16:55:50 +0000
commit5eca84265fc8d7b5c7e5c9f508aded20109ebe32 (patch)
tree98a42f5d67933750ca3e539841c8b8ac7521d409 /ui
parentf48f615ec026fa1526c0c50fd2f3909d441107c0 (diff)
downloadjquery-ui-5eca84265fc8d7b5c7e5c9f508aded20109ebe32.tar.gz
jquery-ui-5eca84265fc8d7b5c7e5c9f508aded20109ebe32.zip
datepicker: prev/next buttons were bumping in disabled state due to :hover rules in the stylesheet, fixed by adding ui-datepicker-prev/next-hover classes, fixes #3774
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.datepicker.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js
index c50a606b9..e61f6fbc6 100644
--- a/ui/ui.datepicker.js
+++ b/ui/ui.datepicker.js
@@ -580,11 +580,15 @@ $.extend(Datepicker.prototype, {
.find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a')
.bind('mouseout', function(){
$(this).removeClass('ui-state-hover');
+ if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
+ if(this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
})
.bind('mouseover', function(){
if (!self._isDisabledDatepicker( inst.inline ? inst.dpDiv.parent()[0] : inst.input[0])) {
$(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
$(this).addClass('ui-state-hover');
+ if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
+ if(this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
}
})
.end()
@@ -1303,7 +1307,7 @@ $.extend(Datepicker.prototype, {
var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
(this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="jQuery.datepicker._gotoToday(\'#' + inst.id + '\');"' +
'>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
- var firstDay = parseInt(this._get(inst, 'firstDay'));
+ var firstDay = parseInt(this._get(inst, 'firstDay'),10);
firstDay = (isNaN(firstDay) ? 0 : firstDay);
var dayNames = this._get(inst, 'dayNames');
var dayNamesShort = this._get(inst, 'dayNamesShort');