diff --git a/tests/unit/datepicker/core.js b/tests/unit/datepicker/core.js index 943a188b879..2a8c5c7cb26 100644 --- a/tests/unit/datepicker/core.js +++ b/tests/unit/datepicker/core.js @@ -54,8 +54,8 @@ QUnit.test( "baseStructure", function( assert ) { header = dp.children( ":first" ); assert.ok( header.is( "div.ui-datepicker-header" ), "Structure - header division" ); assert.equal( header.children().length, 3, "Structure - header child count" ); - assert.ok( header.children( ":first" ).is( "a.ui-datepicker-prev" ) && header.children( ":first" ).html() !== "", "Structure - prev link" ); - assert.ok( header.children( ":eq(1)" ).is( "a.ui-datepicker-next" ) && header.children( ":eq(1)" ).html() !== "", "Structure - next link" ); + assert.ok( header.children( ":first" ).is( "button.ui-datepicker-prev" ) && header.children( ":first" ).html() !== "", "Structure - prev link" ); + assert.ok( header.children( ":eq(1)" ).is( "button.ui-datepicker-next" ) && header.children( ":eq(1)" ).html() !== "", "Structure - next link" ); title = header.children( ":last" ); assert.ok( title.is( "div.ui-datepicker-title" ) && title.html() !== "", "Structure - title division" ); @@ -232,8 +232,8 @@ QUnit.test( "customStructure", function( assert ) { header = dp.children( ":first" ); assert.ok( header.is( "div.ui-datepicker-header" ), "Structure RTL - header division" ); assert.equal( header.children().length, 3, "Structure RTL - header child count" ); - assert.ok( header.children( ":first" ).is( "a.ui-datepicker-next" ), "Structure RTL - prev link" ); - assert.ok( header.children( ":eq(1)" ).is( "a.ui-datepicker-prev" ), "Structure RTL - next link" ); + assert.ok( header.children( ":first" ).is( "button.ui-datepicker-next" ), "Structure RTL - prev link" ); + assert.ok( header.children( ":eq(1)" ).is( "button.ui-datepicker-prev" ), "Structure RTL - next link" ); panel = dp.children( ":last" ); assert.ok( panel.is( "div.ui-datepicker-buttonpane" ), "Structure RTL - button division" ); @@ -303,7 +303,7 @@ QUnit.test( "customStructure", function( assert ) { testHelper.onFocus( inp, function() { thead = dp.find( ".ui-datepicker-calendar thead tr" ); assert.equal( thead.children().length, 7, "Structure read-only first day - thead child count" ); - assert.equal( thead.find( "a" ).length, 0, "Structure read-only first day - thead links count" ); + assert.equal( thead.find( "button" ).length, 0, "Structure read-only first day - thead links count" ); inp.datepicker( "hide" ).datepicker( "destroy" ); ready(); @@ -463,11 +463,11 @@ QUnit.test( "mouse", function( assert ) { dp = $( "#ui-datepicker-div" ), date = new Date(); inp.val( "" ).datepicker( "show" ); - $( ".ui-datepicker-calendar tbody a:contains(10)", dp ).simulate( "click", {} ); + $( ".ui-datepicker-calendar tbody button:contains(10)", dp ).simulate( "click", {} ); date.setDate( 10 ); testHelper.equalsDate( assert, inp.datepicker( "getDate" ), date, "Mouse click" ); inp.val( "02/04/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar tbody a:contains(12)", dp ).simulate( "click", {} ); + $( ".ui-datepicker-calendar tbody button:contains(12)", dp ).simulate( "click", {} ); testHelper.equalsDate( assert, inp.datepicker( "getDate" ), new Date( 2008, 2 - 1, 12 ), "Mouse click - preset" ); inp.val( "02/04/2008" ).datepicker( "show" ); @@ -479,7 +479,7 @@ QUnit.test( "mouse", function( assert ) { testHelper.equalsDate( assert, inp.datepicker( "getDate" ), new Date( 2008, 2 - 1, 4 ), "Mouse click - close + preset" ); inp.val( "02/04/2008" ).datepicker( "show" ); - $( "a.ui-datepicker-prev", dp ).simulate( "click", {} ); + $( "button.ui-datepicker-prev", dp ).simulate( "click", {} ); $( "button.ui-datepicker-close", dp ).simulate( "click", {} ); testHelper.equalsDate( assert, inp.datepicker( "getDate" ), new Date( 2008, 2 - 1, 4 ), "Mouse click - abandoned" ); @@ -487,17 +487,17 @@ QUnit.test( "mouse", function( assert ) { // Current/previous/next inp.val( "02/04/2008" ).datepicker( "option", { showButtonPanel: true } ).datepicker( "show" ); $( ".ui-datepicker-current", dp ).simulate( "click", {} ); - $( ".ui-datepicker-calendar tbody a:contains(14)", dp ).simulate( "click", {} ); + $( ".ui-datepicker-calendar tbody button:contains(14)", dp ).simulate( "click", {} ); date.setDate( 14 ); testHelper.equalsDate( assert, inp.datepicker( "getDate" ), date, "Mouse click - current" ); inp.val( "02/04/2008" ).datepicker( "show" ); $( ".ui-datepicker-prev", dp ).simulate( "click" ); - $( ".ui-datepicker-calendar tbody a:contains(16)", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar tbody button:contains(16)", dp ).simulate( "click" ); testHelper.equalsDate( assert, inp.datepicker( "getDate" ), new Date( 2008, 1 - 1, 16 ), "Mouse click - previous" ); inp.val( "02/04/2008" ).datepicker( "show" ); $( ".ui-datepicker-next", dp ).simulate( "click" ); - $( ".ui-datepicker-calendar tbody a:contains(18)", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar tbody button:contains(18)", dp ).simulate( "click" ); testHelper.equalsDate( assert, inp.datepicker( "getDate" ), new Date( 2008, 3 - 1, 18 ), "Mouse click - next" ); @@ -505,12 +505,12 @@ QUnit.test( "mouse", function( assert ) { inp.datepicker( "option", { minDate: new Date( 2008, 2 - 1, 2 ), maxDate: new Date( 2008, 2 - 1, 26 ) } ).val( "02/04/2008" ).datepicker( "show" ); $( ".ui-datepicker-prev", dp ).simulate( "click" ); - $( ".ui-datepicker-calendar tbody a:contains(16)", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar tbody button:contains(16)", dp ).simulate( "click" ); testHelper.equalsDate( assert, inp.datepicker( "getDate" ), new Date( 2008, 2 - 1, 16 ), "Mouse click - previous + min/max" ); inp.val( "02/04/2008" ).datepicker( "show" ); $( ".ui-datepicker-next", dp ).simulate( "click" ); - $( ".ui-datepicker-calendar tbody a:contains(18)", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar tbody button:contains(18)", dp ).simulate( "click" ); testHelper.equalsDate( assert, inp.datepicker( "getDate" ), new Date( 2008, 2 - 1, 18 ), "Mouse click - next + min/max" ); @@ -519,25 +519,25 @@ QUnit.test( "mouse", function( assert ) { dp = $( ".ui-datepicker-inline", inl ); date = new Date(); inl.datepicker( "setDate", date ); - $( ".ui-datepicker-calendar tbody a:contains(10)", dp ).simulate( "click", {} ); + $( ".ui-datepicker-calendar tbody button:contains(10)", dp ).simulate( "click", {} ); date.setDate( 10 ); testHelper.equalsDate( assert, inl.datepicker( "getDate" ), date, "Mouse click inline" ); inl.datepicker( "option", { showButtonPanel: true } ).datepicker( "setDate", new Date( 2008, 2 - 1, 4 ) ); - $( ".ui-datepicker-calendar tbody a:contains(12)", dp ).simulate( "click", {} ); + $( ".ui-datepicker-calendar tbody button:contains(12)", dp ).simulate( "click", {} ); testHelper.equalsDate( assert, inl.datepicker( "getDate" ), new Date( 2008, 2 - 1, 12 ), "Mouse click inline - preset" ); inl.datepicker( "option", { showButtonPanel: true } ); $( ".ui-datepicker-current", dp ).simulate( "click", {} ); - $( ".ui-datepicker-calendar tbody a:contains(14)", dp ).simulate( "click", {} ); + $( ".ui-datepicker-calendar tbody button:contains(14)", dp ).simulate( "click", {} ); date.setDate( 14 ); testHelper.equalsDate( assert, inl.datepicker( "getDate" ), date, "Mouse click inline - current" ); inl.datepicker( "setDate", new Date( 2008, 2 - 1, 4 ) ); $( ".ui-datepicker-prev", dp ).simulate( "click" ); - $( ".ui-datepicker-calendar tbody a:contains(16)", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar tbody button:contains(16)", dp ).simulate( "click" ); testHelper.equalsDate( assert, inl.datepicker( "getDate" ), new Date( 2008, 1 - 1, 16 ), "Mouse click inline - previous" ); inl.datepicker( "setDate", new Date( 2008, 2 - 1, 4 ) ); $( ".ui-datepicker-next", dp ).simulate( "click" ); - $( ".ui-datepicker-calendar tbody a:contains(18)", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar tbody button:contains(18)", dp ).simulate( "click" ); testHelper.equalsDate( assert, inl.datepicker( "getDate" ), new Date( 2008, 3 - 1, 18 ), "Mouse click inline - next" ); } ); diff --git a/tests/unit/datepicker/events.js b/tests/unit/datepicker/events.js index 941822ef886..35f4652b259 100644 --- a/tests/unit/datepicker/events.js +++ b/tests/unit/datepicker/events.js @@ -144,15 +144,15 @@ QUnit.test( "beforeShowDay-getDate", function( assert ) { // Support: IE <9, jQuery <1.8 // In IE7/8 with jQuery <1.8, encoded spaces behave in strange ways $( "January 2010" ).text(), "Initial month" ); - $( "a.ui-datepicker-next", dp ).trigger( "click" ); - $( "a.ui-datepicker-next", dp ).trigger( "click" ); + $( "button.ui-datepicker-next", dp ).trigger( "click" ); + $( "button.ui-datepicker-next", dp ).trigger( "click" ); // Contains non-breaking space assert.equal( $( "div.ui-datepicker-title" ).text(), $( "March 2010" ).text(), "After next clicks" ); inp.datepicker( "hide" ).datepicker( "show" ); - $( "a.ui-datepicker-prev", dp ).trigger( "click" ); - $( "a.ui-datepicker-prev", dp ).trigger( "click" ); + $( "button.ui-datepicker-prev", dp ).trigger( "click" ); + $( "button.ui-datepicker-prev", dp ).trigger( "click" ); // Contains non-breaking space assert.equal( $( "div.ui-datepicker-title" ).text(), diff --git a/tests/unit/datepicker/options.js b/tests/unit/datepicker/options.js index 821852ed4a7..04c74a9c396 100644 --- a/tests/unit/datepicker/options.js +++ b/tests/unit/datepicker/options.js @@ -255,7 +255,7 @@ QUnit.test( "otherMonths", function( assert ) { inp.datepicker( "hide" ).datepicker( "option", "selectOtherMonths", true ).datepicker( "show" ); assert.equal( pop.find( "tbody" ).text(), "311234567891011121314151617181920212223242526272829301234", "Other months - select" ); - assert.ok( pop.find( "td:last a" ).length === 1, "Other months - link content" ); + assert.ok( pop.find( "td:last button" ).length === 1, "Other months - link content" ); inp.datepicker( "hide" ).datepicker( "option", "showOtherMonths", false ).datepicker( "show" ); assert.equal( pop.find( "tbody" ).text(), @@ -289,7 +289,7 @@ QUnit.test( "defaultDate", function( assert ) { testHelper.equalsDate( assert, inp.datepicker( "getDate" ), date, "Default date 3" ); date = new Date(); - inp.datepicker( "option", { defaultDate: 1 / "a" } ). + inp.datepicker( "option", { defaultDate: 1 / "button" } ). datepicker( "hide" ).val( "" ).datepicker( "show" ). simulate( "keydown", { keyCode: $.ui.keyCode.ENTER } ); testHelper.equalsDate( assert, inp.datepicker( "getDate" ), date, "Default date NaN" ); @@ -710,82 +710,82 @@ QUnit.test( "daylightSaving", function( assert ) { // Australia, Sydney - AM change, southern hemisphere inp.val( "04/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(6) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(6) button", dp ).simulate( "click" ); assert.equal( inp.val(), "04/05/2008", "Daylight saving - Australia 04/05/2008" ); inp.val( "04/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(7) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(7) button", dp ).simulate( "click" ); assert.equal( inp.val(), "04/06/2008", "Daylight saving - Australia 04/06/2008" ); inp.val( "04/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(8) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(8) button", dp ).simulate( "click" ); assert.equal( inp.val(), "04/07/2008", "Daylight saving - Australia 04/07/2008" ); inp.val( "10/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(6) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(6) button", dp ).simulate( "click" ); assert.equal( inp.val(), "10/04/2008", "Daylight saving - Australia 10/04/2008" ); inp.val( "10/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(7) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(7) button", dp ).simulate( "click" ); assert.equal( inp.val(), "10/05/2008", "Daylight saving - Australia 10/05/2008" ); inp.val( "10/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(8) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(8) button", dp ).simulate( "click" ); assert.equal( inp.val(), "10/06/2008", "Daylight saving - Australia 10/06/2008" ); // Brasil, Brasilia - midnight change, southern hemisphere inp.val( "02/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(20) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(20) button", dp ).simulate( "click" ); assert.equal( inp.val(), "02/16/2008", "Daylight saving - Brasil 02/16/2008" ); inp.val( "02/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(21) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(21) button", dp ).simulate( "click" ); assert.equal( inp.val(), "02/17/2008", "Daylight saving - Brasil 02/17/2008" ); inp.val( "02/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(22) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(22) button", dp ).simulate( "click" ); assert.equal( inp.val(), "02/18/2008", "Daylight saving - Brasil 02/18/2008" ); inp.val( "10/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(13) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(13) button", dp ).simulate( "click" ); assert.equal( inp.val(), "10/11/2008", "Daylight saving - Brasil 10/11/2008" ); inp.val( "10/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(14) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(14) button", dp ).simulate( "click" ); assert.equal( inp.val(), "10/12/2008", "Daylight saving - Brasil 10/12/2008" ); inp.val( "10/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(15) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(15) button", dp ).simulate( "click" ); assert.equal( inp.val(), "10/13/2008", "Daylight saving - Brasil 10/13/2008" ); // Lebanon, Beirut - midnight change, northern hemisphere inp.val( "03/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(34) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(34) button", dp ).simulate( "click" ); assert.equal( inp.val(), "03/29/2008", "Daylight saving - Lebanon 03/29/2008" ); inp.val( "03/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(35) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(35) button", dp ).simulate( "click" ); assert.equal( inp.val(), "03/30/2008", "Daylight saving - Lebanon 03/30/2008" ); inp.val( "03/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(36) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(36) button", dp ).simulate( "click" ); assert.equal( inp.val(), "03/31/2008", "Daylight saving - Lebanon 03/31/2008" ); inp.val( "10/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(27) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(27) button", dp ).simulate( "click" ); assert.equal( inp.val(), "10/25/2008", "Daylight saving - Lebanon 10/25/2008" ); inp.val( "10/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(28) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(28) button", dp ).simulate( "click" ); assert.equal( inp.val(), "10/26/2008", "Daylight saving - Lebanon 10/26/2008" ); inp.val( "10/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(29) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(29) button", dp ).simulate( "click" ); assert.equal( inp.val(), "10/27/2008", "Daylight saving - Lebanon 10/27/2008" ); // US, Eastern - AM change, northern hemisphere inp.val( "03/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(13) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(13) button", dp ).simulate( "click" ); assert.equal( inp.val(), "03/08/2008", "Daylight saving - US 03/08/2008" ); inp.val( "03/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(14) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(14) button", dp ).simulate( "click" ); assert.equal( inp.val(), "03/09/2008", "Daylight saving - US 03/09/2008" ); inp.val( "03/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(15) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(15) button", dp ).simulate( "click" ); assert.equal( inp.val(), "03/10/2008", "Daylight saving - US 03/10/2008" ); inp.val( "11/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(6) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(6) button", dp ).simulate( "click" ); assert.equal( inp.val(), "11/01/2008", "Daylight saving - US 11/01/2008" ); inp.val( "11/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(7) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(7) button", dp ).simulate( "click" ); assert.equal( inp.val(), "11/02/2008", "Daylight saving - US 11/02/2008" ); inp.val( "11/01/2008" ).datepicker( "show" ); - $( ".ui-datepicker-calendar td:eq(8) a", dp ).simulate( "click" ); + $( ".ui-datepicker-calendar td:eq(8) button", dp ).simulate( "click" ); assert.equal( inp.val(), "11/03/2008", "Daylight saving - US 11/03/2008" ); } ); diff --git a/themes/base/datepicker.css b/themes/base/datepicker.css index 91da063a65b..16033e4a9d2 100644 --- a/themes/base/datepicker.css +++ b/themes/base/datepicker.css @@ -23,6 +23,7 @@ top: 2px; width: 1.8em; height: 1.8em; + border: none; } .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { @@ -79,11 +80,12 @@ padding: 1px; } .ui-datepicker td span, -.ui-datepicker td a { +.ui-datepicker td button { display: block; padding: .2em; text-align: right; text-decoration: none; + width: 100%; } .ui-datepicker .ui-datepicker-buttonpane { background-image: none; diff --git a/ui/widgets/datepicker.js b/ui/widgets/datepicker.js index 63f713ec026..d62eaf0204a 100644 --- a/ui/widgets/datepicker.js +++ b/ui/widgets/datepicker.js @@ -1035,7 +1035,7 @@ $.extend( Datepicker.prototype, { } inst = this._getInst( target[ 0 ] ); - inst.selectedDay = inst.currentDay = $( "a", td ).html(); + inst.selectedDay = inst.currentDay = $( "button", td ).html(); inst.selectedMonth = inst.currentMonth = month; inst.selectedYear = inst.currentYear = year; this._selectDate( id, this._formatDate( inst, @@ -1703,9 +1703,9 @@ $.extend( Datepicker.prototype, { this._getFormatConfig( inst ) ) ); prev = ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ? - "" + prevText + "" : - ( hideIfNoPrevNext ? "" : "" + prevText + "" ) ); + "" : + ( hideIfNoPrevNext ? "" : "" ) ); nextText = this._get( inst, "nextText" ); nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText, @@ -1713,9 +1713,9 @@ $.extend( Datepicker.prototype, { this._getFormatConfig( inst ) ) ); next = ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ? - "" + nextText + "" : - ( hideIfNoPrevNext ? "" : "" + nextText + "" ) ); + "" : + ( hideIfNoPrevNext ? "" : "" ) ); currentText = this._get( inst, "currentText" ); gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today ); @@ -1811,11 +1811,12 @@ $.extend( Datepicker.prototype, { ( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "'" ) + "'" : "" ) + // cell title ( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions ( otherMonth && !showOtherMonths ? " " : // display for other months - ( unselectable ? "" + printDate.getDate() + "" : "" + printDate.getDate() + "" : "" ) ) + ""; // display selectable date printDate.setDate( printDate.getDate() + 1 ); printDate = this._daylightSavingAdjust( printDate ); } @@ -2032,7 +2033,7 @@ $.extend( Datepicker.prototype, { * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. */ function datepicker_bindHover( dpDiv ) { - var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; + var selector = "button"; return dpDiv.on( "mouseout", selector, function() { $( this ).removeClass( "ui-state-hover" ); if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) { @@ -2047,7 +2048,7 @@ function datepicker_bindHover( dpDiv ) { function datepicker_handleMouseover() { if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) { - $( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" ); + $( this ).parents( ".ui-datepicker-calendar" ).find( "button" ).removeClass( "ui-state-hover" ); $( this ).addClass( "ui-state-hover" ); if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) { $( this ).addClass( "ui-datepicker-prev-hover" );