@@ -985,11 +985,11 @@ QUnit.test('Month buttons are disabled', function (assert) {
985985 field . MonthPicker ( 'Open' ) ;
986986
987987 var menu = $ ( MonthPicker_RistrictMonthField ) ;
988- var previousYearButton = menu . find ( '.month-picker-previous>a ' ) ;
989- var nextYearButton = menu . find ( '.month-picker-next>a ' ) ;
988+ var previousYearButton = menu . find ( '.month-picker-previous>.ui-button ' ) ;
989+ var nextYearButton = menu . find ( '.month-picker-next>.ui-button ' ) ;
990990
991991 // Try to click the disabled buttons.
992- var buttons = menu . find ( '.month-picker-month-table button' ) ;
992+ var buttons = menu . find ( '.month-picker-month-table .ui- button' ) ;
993993 $ ( buttons . slice ( 0 , 8 ) ) . trigger ( 'click' ) ;
994994
995995 assert . ok ( previousYearButton . is ( '.ui-button-disabled' ) , 'The previous year button is disabled' ) ;
@@ -1066,7 +1066,7 @@ QUnit.test('Year buttons are disabled', function (assert) {
10661066 menu . find ( '.month-picker-title a' ) . trigger ( 'click' ) ;
10671067
10681068 // Make sure we are in years view.
1069- var buttons = menu . find ( '.month-picker-month-table button' ) ;
1069+ var buttons = menu . find ( '.month-picker-month-table .ui- button' ) ;
10701070 var firstVisibleYear = parseInt ( $ ( buttons [ 0 ] ) . text ( ) , 10 ) ;
10711071 assert . ok ( firstVisibleYear , 'The menu is showing the year table' ) ;
10721072
@@ -1085,7 +1085,7 @@ QUnit.test('Year buttons are disabled', function (assert) {
10851085 assert . ok ( firstVisibleYear , "Clciking the disabled buttons didn't take us to month view" ) ;
10861086
10871087 // Make sure the next years button is disabled.
1088- var nextYearsButton = menu . find ( '.month-picker-next>a ' ) ;
1088+ var nextYearsButton = menu . find ( '.month-picker-next>.ui-button ' ) ;
10891089 var isDisabled = nextYearsButton
10901090 . trigger ( 'click' )
10911091 . is ( '.ui-button-disabled' ) ;
@@ -1094,7 +1094,7 @@ QUnit.test('Year buttons are disabled', function (assert) {
10941094 var newFirstYrar = parseInt ( $ ( buttons [ 0 ] ) . text ( ) , 10 ) ;
10951095 assert . equal ( newFirstYrar , firstVisibleYear , "Clicking next year didn't change the year" ) ;
10961096
1097- var previousYearsButton = menu . find ( '.month-picker-previous>a ' ) ;
1097+ var previousYearsButton = menu . find ( '.month-picker-previous>.ui-button ' ) ;
10981098 // Keep going back until there are no disabled buttons.
10991099 // We count to 10 to avoid an infinite loop in case there's
11001100 // a bug where we are going back in time but the the buttons stay disabled.
@@ -1264,12 +1264,12 @@ QUnit.test('Today and selected months are highlighted', function (assert) {
12641264 field . MonthPicker ( 'Open' ) ;
12651265 var menu = $ ( MonthPicker_highlightedField ) ;
12661266
1267- var buttons = menu . find ( '.month-picker-month-table button' ) ;
1267+ var buttons = menu . find ( '.month-picker-month-table .ui- button' ) ;
12681268
12691269 var todaysButton = $ ( buttons [ new Date ( ) . getMonth ( ) ] ) ;
12701270
1271- var nextYearButton = menu . find ( '.month-picker-next>a ' ) ;
1272- var previousYearButton = menu . find ( '.month-picker-previous>a ' ) ;
1271+ var nextYearButton = menu . find ( '.month-picker-next>.ui-button ' ) ;
1272+ var previousYearButton = menu . find ( '.month-picker-previous>.ui-button ' ) ;
12731273
12741274 assert . ok ( todaysButton . is ( '.ui-state-highlight' ) , "Today's month is highlighted" ) ;
12751275
@@ -1292,7 +1292,7 @@ QUnit.test('Today and selected months are highlighted', function (assert) {
12921292 assert . equal ( selectedButton . length , 1 , 'There is one selected button' ) ;
12931293 assert . equal ( selectedButton [ 0 ] , buttons [ 4 ] , 'The selected month is highlighted' ) ;
12941294
1295- menu . find ( '.month-picker-title a ' ) . trigger ( 'click' ) ;
1295+ menu . find ( '.month-picker-title .ui-button ' ) . trigger ( 'click' ) ;
12961296
12971297 var selectdBtn = buttons . filter ( '.ui-state-active' ) ;
12981298 assert . equal ( selectdBtn . jqueryUIButton ( "option" , "label" ) , _today . getFullYear ( ) , 'The selected year is highlighted' ) ;
@@ -1330,10 +1330,10 @@ QUnit.test('Number of months from today', function (assert) {
13301330 var menu = $ ( MonthPicker_RistrictMonthField ) ;
13311331
13321332 // Make sure we are in years view.
1333- var buttons = menu . find ( '.month-picker-month-table button' ) ;
1333+ var buttons = menu . find ( '.month-picker-month-table .ui- button' ) ;
13341334
1335- var nextYearButton = menu . find ( '.month-picker-next>a ' ) ;
1336- var previousYearButton = menu . find ( '.month-picker-previous>a ' ) ;
1335+ var nextYearButton = menu . find ( '.month-picker-next>.ui-button ' ) ;
1336+ var previousYearButton = menu . find ( '.month-picker-previous>.ui-button ' ) ;
13371337
13381338 var enabledMonths = 0 ;
13391339
@@ -1387,9 +1387,9 @@ QUnit.test('Relative month periods', function (assert) {
13871387 var menu = $ ( MonthPicker_RistrictMonthField ) ;
13881388
13891389 // Make sure we are in years view.
1390- var buttons = menu . find ( '.month-picker-month-table button' ) ;
1391- var nextYearButton = menu . find ( '.month-picker-next>a ' ) ;
1392- var previousYearButton = menu . find ( '.month-picker-previous>a ' ) ;
1390+ var buttons = menu . find ( '.month-picker-month-table .ui- button' ) ;
1391+ var nextYearButton = menu . find ( '.month-picker-next>.ui-button ' ) ;
1392+ var previousYearButton = menu . find ( '.month-picker-previous>.ui-button ' ) ;
13931393 var enabledMonths = 0 ;
13941394
13951395 // Make sure that 18 buttons + 1 for today are disabled.
@@ -1437,7 +1437,7 @@ QUnit.test('JavaScript Date objects', function (assert) {
14371437 field . val ( '05/2015' ) ;
14381438
14391439 var menu = $ ( MonthPicker_RistrictMonthField ) ;
1440- var buttons = menu . find ( '.month-picker-month-table button' ) ;
1440+ var buttons = menu . find ( '.month-picker-month-table .ui- button' ) ;
14411441
14421442 field . MonthPicker ( 'Open' ) ;
14431443 assert . equal ( buttons . not ( '.ui-button-disabled' ) . length , 10 , '10 month buttons are enabled' ) ;
@@ -1535,7 +1535,7 @@ QUnit.test('Back to 2015 button', function (assert) {
15351535 // Keep clicking next until today's year is not visible.
15361536 // We count to 10 to avoid an infinite loop in case there's
15371537 // a bug where the next button is not going to the next year.
1538- var buttons = menu . find ( '.month-picker-month-table button' ) ;
1538+ var buttons = menu . find ( '.month-picker-month-table .ui- button' ) ;
15391539 var hasNext = buttons . is ( '.ui-state-highlight' ) ;
15401540 assert . ok ( hasNext , "Today's year is highlighted" ) ;
15411541 var i = 0 ;
0 commit comments