@@ -51,33 +51,33 @@ QUnit.test( "baseStructure", function( assert ) {
51
51
assert . ok ( ! dp . is ( ".ui-datepicker-multi" ) , "Structure - not multi-month" ) ;
52
52
assert . equal ( dp . children ( ) . length , 2 , "Structure - child count" ) ;
53
53
54
- header = dp . children ( ": first" ) ;
54
+ header = dp . children ( ) . first ( ) ;
55
55
assert . ok ( header . is ( "div.ui-datepicker-header" ) , "Structure - header division" ) ;
56
56
assert . equal ( header . children ( ) . length , 3 , "Structure - header child count" ) ;
57
- assert . ok ( header . children ( ": first" ) . is ( "a.ui-datepicker-prev" ) && header . children ( ": first" ) . html ( ) !== "" , "Structure - prev link" ) ;
58
- assert . ok ( header . children ( ": eq(1)" ) . is ( "a.ui-datepicker-next" ) && header . children ( ":eq(1)" ) . html ( ) !== "" , "Structure - next link" ) ;
57
+ assert . ok ( header . children ( ) . first ( ) . is ( "a.ui-datepicker-prev" ) && header . children ( ) . first ( ) . html ( ) !== "" , "Structure - prev link" ) ;
58
+ assert . ok ( header . children ( ) . eq ( 1 ) . is ( "a.ui-datepicker-next" ) && header . children ( ) . eq ( 1 ) . html ( ) !== "" , "Structure - next link" ) ;
59
59
60
- title = header . children ( ": last" ) ;
60
+ title = header . children ( ) . last ( ) ;
61
61
assert . ok ( title . is ( "div.ui-datepicker-title" ) && title . html ( ) !== "" , "Structure - title division" ) ;
62
62
assert . equal ( title . children ( ) . length , 2 , "Structure - title child count" ) ;
63
- assert . ok ( title . children ( ": first" ) . is ( "span.ui-datepicker-month" ) && title . children ( ": first" ) . text ( ) !== "" , "Structure - month text" ) ;
64
- assert . ok ( title . children ( ": last" ) . is ( "span.ui-datepicker-year" ) && title . children ( ": last" ) . text ( ) !== "" , "Structure - year text" ) ;
63
+ assert . ok ( title . children ( ) . first ( ) . is ( "span.ui-datepicker-month" ) && title . children ( ) . first ( ) . text ( ) !== "" , "Structure - month text" ) ;
64
+ assert . ok ( title . children ( ) . last ( ) . is ( "span.ui-datepicker-year" ) && title . children ( ) . last ( ) . text ( ) !== "" , "Structure - year text" ) ;
65
65
66
- table = dp . children ( ": eq(1)" ) ;
66
+ table = dp . children ( ) . eq ( 1 ) ;
67
67
assert . ok ( table . is ( "table.ui-datepicker-calendar" ) , "Structure - month table" ) ;
68
- assert . ok ( table . children ( ": first" ) . is ( "thead" ) , "Structure - month table thead" ) ;
68
+ assert . ok ( table . children ( ) . first ( ) . is ( "thead" ) , "Structure - month table thead" ) ;
69
69
70
- thead = table . children ( ": first" ) . children ( ": first" ) ;
70
+ thead = table . children ( ) . first ( ) . children ( ) . first ( ) ;
71
71
assert . ok ( thead . is ( "tr" ) , "Structure - month table title row" ) ;
72
72
assert . equal ( thead . find ( "th" ) . length , 7 , "Structure - month table title cells" ) ;
73
- assert . ok ( table . children ( ": eq(1)" ) . is ( "tbody" ) , "Structure - month table body" ) ;
74
- assert . ok ( table . children ( ": eq(1)" ) . children ( "tr" ) . length >= 4 , "Structure - month table week count" ) ;
73
+ assert . ok ( table . children ( ) . eq ( 1 ) . is ( "tbody" ) , "Structure - month table body" ) ;
74
+ assert . ok ( table . children ( ) . eq ( 1 ) . children ( "tr" ) . length >= 4 , "Structure - month table week count" ) ;
75
75
76
- week = table . children ( ": eq(1)" ) . children ( ": first" ) ;
76
+ week = table . children ( ) . eq ( 1 ) . children ( ) . first ( ) ;
77
77
assert . ok ( week . is ( "tr" ) , "Structure - month table week row" ) ;
78
78
assert . equal ( week . children ( ) . length , 7 , "Structure - week child count" ) ;
79
- assert . ok ( week . children ( ": first" ) . is ( "td.ui-datepicker-week-end" ) , "Structure - month table first day cell" ) ;
80
- assert . ok ( week . children ( ": last" ) . is ( "td.ui-datepicker-week-end" ) , "Structure - month table second day cell" ) ;
79
+ assert . ok ( week . children ( ) . first ( ) . is ( "td.ui-datepicker-week-end" ) , "Structure - month table first day cell" ) ;
80
+ assert . ok ( week . children ( ) . last ( ) . is ( "td.ui-datepicker-week-end" ) , "Structure - month table second day cell" ) ;
81
81
82
82
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
83
83
step2 ( ) ;
@@ -94,14 +94,14 @@ QUnit.test( "baseStructure", function( assert ) {
94
94
} ) ;
95
95
testHelper . onFocus ( inp , function ( ) {
96
96
title = dp . find ( "div.ui-datepicker-title" ) ;
97
- assert . ok ( title . children ( ": first" ) . is ( "select.ui-datepicker-month" ) , "Structure - month selector" ) ;
98
- assert . ok ( title . children ( ": last" ) . is ( "select.ui-datepicker-year" ) , "Structure - year selector" ) ;
97
+ assert . ok ( title . children ( ) . first ( ) . is ( "select.ui-datepicker-month" ) , "Structure - month selector" ) ;
98
+ assert . ok ( title . children ( ) . last ( ) . is ( "select.ui-datepicker-year" ) , "Structure - year selector" ) ;
99
99
100
- panel = dp . children ( ": last" ) ;
100
+ panel = dp . children ( ) . last ( ) ;
101
101
assert . ok ( panel . is ( "div.ui-datepicker-buttonpane" ) , "Structure - button panel division" ) ;
102
102
assert . equal ( panel . children ( ) . length , 2 , "Structure - button panel child count" ) ;
103
- assert . ok ( panel . children ( ": first" ) . is ( "button.ui-datepicker-current" ) , "Structure - today button" ) ;
104
- assert . ok ( panel . children ( ": last" ) . is ( "button.ui-datepicker-close" ) , "Structure - close button" ) ;
103
+ assert . ok ( panel . children ( ) . first ( ) . is ( "button.ui-datepicker-current" ) , "Structure - today button" ) ;
104
+ assert . ok ( panel . children ( ) . last ( ) . is ( "button.ui-datepicker-close" ) , "Structure - close button" ) ;
105
105
106
106
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
107
107
step3 ( ) ;
@@ -116,13 +116,13 @@ QUnit.test( "baseStructure", function( assert ) {
116
116
assert . ok ( dp . is ( ".ui-datepicker-multi" ) , "Structure multi [2] - multi-month" ) ;
117
117
assert . equal ( dp . children ( ) . length , 3 , "Structure multi [2] - child count" ) ;
118
118
119
- child = dp . children ( ": first" ) ;
119
+ child = dp . children ( ) . first ( ) ;
120
120
assert . ok ( child . is ( "div.ui-datepicker-group" ) && child . is ( "div.ui-datepicker-group-first" ) , "Structure multi [2] - first month division" ) ;
121
121
122
- child = dp . children ( ": eq(1)" ) ;
122
+ child = dp . children ( ) . eq ( 1 ) ;
123
123
assert . ok ( child . is ( "div.ui-datepicker-group" ) && child . is ( "div.ui-datepicker-group-last" ) , "Structure multi [2] - second month division" ) ;
124
124
125
- child = dp . children ( ": eq(2)" ) ;
125
+ child = dp . children ( ) . eq ( 2 ) ;
126
126
assert . ok ( child . is ( "div.ui-datepicker-row-break" ) , "Structure multi [2] - row break" ) ;
127
127
assert . ok ( dp . is ( ".ui-datepicker-multi-2" ) , "Structure multi [2] - multi-2" ) ;
128
128
@@ -152,22 +152,22 @@ QUnit.test( "baseStructure", function( assert ) {
152
152
assert . ok ( dp . is ( ".ui-datepicker-multi" ) , "Structure multi - multi-month" ) ;
153
153
assert . equal ( dp . children ( ) . length , 6 , "Structure multi [2,2] - child count" ) ;
154
154
155
- child = dp . children ( ": first" ) ;
155
+ child = dp . children ( ) . first ( ) ;
156
156
assert . ok ( child . is ( "div.ui-datepicker-group" ) && child . is ( "div.ui-datepicker-group-first" ) , "Structure multi [2,2] - first month division" ) ;
157
157
158
- child = dp . children ( ": eq(1)" ) ;
158
+ child = dp . children ( ) . eq ( 1 ) ;
159
159
assert . ok ( child . is ( "div.ui-datepicker-group" ) && child . is ( "div.ui-datepicker-group-last" ) , "Structure multi [2,2] - second month division" ) ;
160
160
161
- child = dp . children ( ": eq(2)" ) ;
161
+ child = dp . children ( ) . eq ( 2 ) ;
162
162
assert . ok ( child . is ( "div.ui-datepicker-row-break" ) , "Structure multi [2,2] - row break" ) ;
163
163
164
- child = dp . children ( ": eq(3)" ) ;
164
+ child = dp . children ( ) . eq ( 3 ) ;
165
165
assert . ok ( child . is ( "div.ui-datepicker-group" ) && child . is ( "div.ui-datepicker-group-first" ) , "Structure multi [2,2] - third month division" ) ;
166
166
167
- child = dp . children ( ": eq(4)" ) ;
167
+ child = dp . children ( ) . eq ( 4 ) ;
168
168
assert . ok ( child . is ( "div.ui-datepicker-group" ) && child . is ( "div.ui-datepicker-group-last" ) , "Structure multi [2,2] - fourth month division" ) ;
169
169
170
- child = dp . children ( ": eq(5)" ) ;
170
+ child = dp . children ( ) . eq ( 5 ) ;
171
171
assert . ok ( child . is ( "div.ui-datepicker-row-break" ) , "Structure multi [2,2] - row break" ) ;
172
172
173
173
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
@@ -181,14 +181,14 @@ QUnit.test( "baseStructure", function( assert ) {
181
181
assert . ok ( ! dp . is ( ".ui-datepicker-multi" ) , "Structure inline - not multi-month" ) ;
182
182
assert . equal ( dp . children ( ) . length , 2 , "Structure inline - child count" ) ;
183
183
184
- header = dp . children ( ": first" ) ;
184
+ header = dp . children ( ) . first ( ) ;
185
185
assert . ok ( header . is ( "div.ui-datepicker-header" ) , "Structure inline - header division" ) ;
186
186
assert . equal ( header . children ( ) . length , 3 , "Structure inline - header child count" ) ;
187
187
188
- table = dp . children ( ": eq(1)" ) ;
188
+ table = dp . children ( ) . eq ( 1 ) ;
189
189
assert . ok ( table . is ( "table.ui-datepicker-calendar" ) , "Structure inline - month table" ) ;
190
- assert . ok ( table . children ( ": first" ) . is ( "thead" ) , "Structure inline - month table thead" ) ;
191
- assert . ok ( table . children ( ": eq(1)" ) . is ( "tbody" ) , "Structure inline - month table body" ) ;
190
+ assert . ok ( table . children ( ) . first ( ) . is ( "thead" ) , "Structure inline - month table thead" ) ;
191
+ assert . ok ( table . children ( ) . eq ( 1 ) . is ( "tbody" ) , "Structure inline - month table body" ) ;
192
192
193
193
inl . datepicker ( "destroy" ) ;
194
194
@@ -199,13 +199,13 @@ QUnit.test( "baseStructure", function( assert ) {
199
199
assert . ok ( dp . is ( ".ui-datepicker-inline" ) && dp . is ( ".ui-datepicker-multi" ) , "Structure inline multi - main div" ) ;
200
200
assert . equal ( dp . children ( ) . length , 3 , "Structure inline multi - child count" ) ;
201
201
202
- child = dp . children ( ": first" ) ;
202
+ child = dp . children ( ) . first ( ) ;
203
203
assert . ok ( child . is ( "div.ui-datepicker-group" ) && child . is ( "div.ui-datepicker-group-first" ) , "Structure inline multi - first month division" ) ;
204
204
205
- child = dp . children ( ": eq(1)" ) ;
205
+ child = dp . children ( ) . eq ( 1 ) ;
206
206
assert . ok ( child . is ( "div.ui-datepicker-group" ) && child . is ( "div.ui-datepicker-group-last" ) , "Structure inline multi - second month division" ) ;
207
207
208
- child = dp . children ( ": eq(2)" ) ;
208
+ child = dp . children ( ) . eq ( 2 ) ;
209
209
assert . ok ( child . is ( "div.ui-datepicker-row-break" ) , "Structure inline multi - row break" ) ;
210
210
211
211
inl . datepicker ( "destroy" ) ;
@@ -229,17 +229,17 @@ QUnit.test( "customStructure", function( assert ) {
229
229
testHelper . onFocus ( inp , function ( ) {
230
230
assert . ok ( dp . is ( ".ui-datepicker-rtl" ) , "Structure RTL - right-to-left" ) ;
231
231
232
- header = dp . children ( ": first" ) ;
232
+ header = dp . children ( ) . first ( ) ;
233
233
assert . ok ( header . is ( "div.ui-datepicker-header" ) , "Structure RTL - header division" ) ;
234
234
assert . equal ( header . children ( ) . length , 3 , "Structure RTL - header child count" ) ;
235
- assert . ok ( header . children ( ": first" ) . is ( "a.ui-datepicker-next" ) , "Structure RTL - prev link" ) ;
236
- assert . ok ( header . children ( ": eq(1)" ) . is ( "a.ui-datepicker-prev" ) , "Structure RTL - next link" ) ;
235
+ assert . ok ( header . children ( ) . first ( ) . is ( "a.ui-datepicker-next" ) , "Structure RTL - prev link" ) ;
236
+ assert . ok ( header . children ( ) . eq ( 1 ) . is ( "a.ui-datepicker-prev" ) , "Structure RTL - next link" ) ;
237
237
238
- panel = dp . children ( ": last" ) ;
238
+ panel = dp . children ( ) . last ( ) ;
239
239
assert . ok ( panel . is ( "div.ui-datepicker-buttonpane" ) , "Structure RTL - button division" ) ;
240
240
assert . equal ( panel . children ( ) . length , 2 , "Structure RTL - button panel child count" ) ;
241
- assert . ok ( panel . children ( ": first" ) . is ( "button.ui-datepicker-close" ) , "Structure RTL - close button" ) ;
242
- assert . ok ( panel . children ( ": last" ) . is ( "button.ui-datepicker-current" ) , "Structure RTL - today button" ) ;
241
+ assert . ok ( panel . children ( ) . first ( ) . is ( "button.ui-datepicker-close" ) , "Structure RTL - close button" ) ;
242
+ assert . ok ( panel . children ( ) . last ( ) . is ( "button.ui-datepicker-current" ) , "Structure RTL - today button" ) ;
243
243
244
244
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
245
245
step2 ( ) ;
@@ -256,10 +256,10 @@ QUnit.test( "customStructure", function( assert ) {
256
256
inp . val ( "02/10/2008" ) ;
257
257
258
258
testHelper . onFocus ( inp , function ( ) {
259
- header = dp . children ( ": first" ) ;
259
+ header = dp . children ( ) . first ( ) ;
260
260
assert . ok ( header . is ( "div.ui-datepicker-header" ) , "Structure hide prev/next - header division" ) ;
261
261
assert . equal ( header . children ( ) . length , 1 , "Structure hide prev/next - links child count" ) ;
262
- assert . ok ( header . children ( ": first" ) . is ( "div.ui-datepicker-title" ) , "Structure hide prev/next - title division" ) ;
262
+ assert . ok ( header . children ( ) . first ( ) . is ( "div.ui-datepicker-title" ) , "Structure hide prev/next - title division" ) ;
263
263
264
264
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
265
265
step3 ( ) ;
@@ -271,10 +271,10 @@ QUnit.test( "customStructure", function( assert ) {
271
271
inp = testHelper . initNewInput ( { changeMonth : true } ) ;
272
272
273
273
testHelper . onFocus ( inp , function ( ) {
274
- title = dp . children ( ": first" ) . children ( ": last" ) ;
274
+ title = dp . children ( ) . first ( ) . children ( ) . last ( ) ;
275
275
assert . equal ( title . children ( ) . length , 2 , "Structure changeable month - title child count" ) ;
276
- assert . ok ( title . children ( ": first" ) . is ( "select.ui-datepicker-month" ) , "Structure changeable month - month selector" ) ;
277
- assert . ok ( title . children ( ": last" ) . is ( "span.ui-datepicker-year" ) , "Structure changeable month - read-only year" ) ;
276
+ assert . ok ( title . children ( ) . first ( ) . is ( "select.ui-datepicker-month" ) , "Structure changeable month - month selector" ) ;
277
+ assert . ok ( title . children ( ) . last ( ) . is ( "span.ui-datepicker-year" ) , "Structure changeable month - read-only year" ) ;
278
278
279
279
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
280
280
step4 ( ) ;
@@ -286,10 +286,10 @@ QUnit.test( "customStructure", function( assert ) {
286
286
inp = testHelper . initNewInput ( { changeYear : true } ) ;
287
287
288
288
testHelper . onFocus ( inp , function ( ) {
289
- title = dp . children ( ": first" ) . children ( ": last" ) ;
289
+ title = dp . children ( ) . first ( ) . children ( ) . last ( ) ;
290
290
assert . equal ( title . children ( ) . length , 2 , "Structure changeable year - title child count" ) ;
291
- assert . ok ( title . children ( ": first" ) . is ( "span.ui-datepicker-month" ) , "Structure changeable year - read-only month" ) ;
292
- assert . ok ( title . children ( ": last" ) . is ( "select.ui-datepicker-year" ) , "Structure changeable year - year selector" ) ;
291
+ assert . ok ( title . children ( ) . first ( ) . is ( "span.ui-datepicker-month" ) , "Structure changeable year - read-only month" ) ;
292
+ assert . ok ( title . children ( ) . last ( ) . is ( "select.ui-datepicker-year" ) , "Structure changeable year - year selector" ) ;
293
293
294
294
inp . datepicker ( "hide" ) . datepicker ( "destroy" ) ;
295
295
step5 ( ) ;
0 commit comments