@@ -25,7 +25,7 @@ test('by day (right/left arrows)', function(){
25
25
var target ;
26
26
27
27
equal ( this . dp . viewMode , 0 ) ;
28
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
28
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
29
29
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
30
30
31
31
// Navigation: -1 day, left arrow key
@@ -37,7 +37,7 @@ test('by day (right/left arrows)', function(){
37
37
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 2 , 30 ) ) ;
38
38
datesEqual ( this . dp . date , UTCDate ( 2012 , 2 , 30 ) ) ;
39
39
// Month not changed
40
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
40
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
41
41
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
42
42
43
43
// Navigation: +1 day, right arrow key
@@ -49,15 +49,15 @@ test('by day (right/left arrows)', function(){
49
49
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 3 , 1 ) ) ;
50
50
datesEqual ( this . dp . date , UTCDate ( 2012 , 3 , 1 ) ) ;
51
51
// Month changed: April 1 (this is not a joke!)
52
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
52
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
53
53
equal ( target . text ( ) , 'April 2012' , 'Title is "April 2012"' ) ;
54
54
} ) ;
55
55
56
56
test ( 'by week (up/down arrows)' , function ( ) {
57
57
var target ;
58
58
59
59
equal ( this . dp . viewMode , 0 ) ;
60
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
60
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
61
61
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
62
62
63
63
// Navigation: -1 week, up arrow key
@@ -69,7 +69,7 @@ test('by week (up/down arrows)', function(){
69
69
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 2 , 24 ) ) ;
70
70
datesEqual ( this . dp . date , UTCDate ( 2012 , 2 , 24 ) ) ;
71
71
// Month not changed
72
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
72
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
73
73
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
74
74
75
75
// Navigation: +1 week, down arrow key
@@ -80,15 +80,15 @@ test('by week (up/down arrows)', function(){
80
80
} ) ;
81
81
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 3 , 7 ) ) ;
82
82
datesEqual ( this . dp . date , UTCDate ( 2012 , 3 , 7 ) ) ;
83
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
83
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
84
84
equal ( target . text ( ) , 'April 2012' , 'Title is "April 2012"' ) ;
85
85
} ) ;
86
86
87
87
test ( 'by month, v1 (shift + left/right arrows)' , function ( ) {
88
88
var target ;
89
89
90
90
equal ( this . dp . viewMode , 0 ) ;
91
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
91
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
92
92
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
93
93
94
94
// Navigation: -1 month, shift + left arrow key
@@ -101,7 +101,7 @@ test('by month, v1 (shift + left/right arrows)', function(){
101
101
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 1 , 29 ) ) ;
102
102
datesEqual ( this . dp . date , UTCDate ( 2012 , 1 , 29 ) ) ;
103
103
// Month not changed
104
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
104
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
105
105
equal ( target . text ( ) , 'February 2012' , 'Title is "February 2012"' ) ;
106
106
107
107
// Navigation: +1 month, shift + right arrow key
@@ -113,15 +113,15 @@ test('by month, v1 (shift + left/right arrows)', function(){
113
113
} ) ;
114
114
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 3 , 29 ) ) ;
115
115
datesEqual ( this . dp . date , UTCDate ( 2012 , 3 , 29 ) ) ;
116
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
116
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
117
117
equal ( target . text ( ) , 'April 2012' , 'Title is "April 2012"' ) ;
118
118
} ) ;
119
119
120
120
test ( 'by month, v2 (shift + up/down arrows)' , function ( ) {
121
121
var target ;
122
122
123
123
equal ( this . dp . viewMode , 0 ) ;
124
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
124
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
125
125
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
126
126
127
127
// Navigation: -1 month, shift + up arrow key
@@ -134,7 +134,7 @@ test('by month, v2 (shift + up/down arrows)', function(){
134
134
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 1 , 29 ) ) ;
135
135
datesEqual ( this . dp . date , UTCDate ( 2012 , 1 , 29 ) ) ;
136
136
// Month not changed
137
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
137
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
138
138
equal ( target . text ( ) , 'February 2012' , 'Title is "February 2012"' ) ;
139
139
140
140
// Navigation: +1 month, shift + down arrow key
@@ -146,15 +146,15 @@ test('by month, v2 (shift + up/down arrows)', function(){
146
146
} ) ;
147
147
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 3 , 29 ) ) ;
148
148
datesEqual ( this . dp . date , UTCDate ( 2012 , 3 , 29 ) ) ;
149
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
149
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
150
150
equal ( target . text ( ) , 'April 2012' , 'Title is "April 2012"' ) ;
151
151
} ) ;
152
152
153
153
test ( 'by year, v1 (ctrl + left/right arrows)' , function ( ) {
154
154
var target ;
155
155
156
156
equal ( this . dp . viewMode , 0 ) ;
157
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
157
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
158
158
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
159
159
160
160
// Navigation: -1 year, ctrl + left arrow key
@@ -167,7 +167,7 @@ test('by year, v1 (ctrl + left/right arrows)', function(){
167
167
datesEqual ( this . dp . viewDate , UTCDate ( 2011 , 2 , 31 ) ) ;
168
168
datesEqual ( this . dp . date , UTCDate ( 2011 , 2 , 31 ) ) ;
169
169
// Month not changed
170
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
170
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
171
171
equal ( target . text ( ) , 'March 2011' , 'Title is "March 2011"' ) ;
172
172
173
173
// Navigation: +1 year, ctrl + right arrow key
@@ -179,15 +179,15 @@ test('by year, v1 (ctrl + left/right arrows)', function(){
179
179
} ) ;
180
180
datesEqual ( this . dp . viewDate , UTCDate ( 2013 , 2 , 31 ) ) ;
181
181
datesEqual ( this . dp . date , UTCDate ( 2013 , 2 , 31 ) ) ;
182
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
182
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
183
183
equal ( target . text ( ) , 'March 2013' , 'Title is "March 2013"' ) ;
184
184
} ) ;
185
185
186
186
test ( 'by year, v2 (ctrl + up/down arrows)' , function ( ) {
187
187
var target ;
188
188
189
189
equal ( this . dp . viewMode , 0 ) ;
190
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
190
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
191
191
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
192
192
193
193
// Navigation: -1 year, ctrl + up arrow key
@@ -200,7 +200,7 @@ test('by year, v2 (ctrl + up/down arrows)', function(){
200
200
datesEqual ( this . dp . viewDate , UTCDate ( 2011 , 2 , 31 ) ) ;
201
201
datesEqual ( this . dp . date , UTCDate ( 2011 , 2 , 31 ) ) ;
202
202
// Month not changed
203
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
203
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
204
204
equal ( target . text ( ) , 'March 2011' , 'Title is "March 2011"' ) ;
205
205
206
206
// Navigation: +1 year, ctrl + down arrow key
@@ -212,15 +212,15 @@ test('by year, v2 (ctrl + up/down arrows)', function(){
212
212
} ) ;
213
213
datesEqual ( this . dp . viewDate , UTCDate ( 2013 , 2 , 31 ) ) ;
214
214
datesEqual ( this . dp . date , UTCDate ( 2013 , 2 , 31 ) ) ;
215
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
215
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
216
216
equal ( target . text ( ) , 'March 2013' , 'Title is "March 2013"' ) ;
217
217
} ) ;
218
218
219
219
test ( 'by year, v3 (ctrl + shift + left/right arrows)' , function ( ) {
220
220
var target ;
221
221
222
222
equal ( this . dp . viewMode , 0 ) ;
223
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
223
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
224
224
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
225
225
226
226
// Navigation: -1 year, ctrl + left arrow key
@@ -234,7 +234,7 @@ test('by year, v3 (ctrl + shift + left/right arrows)', function(){
234
234
datesEqual ( this . dp . viewDate , UTCDate ( 2011 , 2 , 31 ) ) ;
235
235
datesEqual ( this . dp . date , UTCDate ( 2011 , 2 , 31 ) ) ;
236
236
// Month not changed
237
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
237
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
238
238
equal ( target . text ( ) , 'March 2011' , 'Title is "March 2011"' ) ;
239
239
240
240
// Navigation: +1 year, ctrl + right arrow key
@@ -247,15 +247,15 @@ test('by year, v3 (ctrl + shift + left/right arrows)', function(){
247
247
} ) ;
248
248
datesEqual ( this . dp . viewDate , UTCDate ( 2013 , 2 , 31 ) ) ;
249
249
datesEqual ( this . dp . date , UTCDate ( 2013 , 2 , 31 ) ) ;
250
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
250
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
251
251
equal ( target . text ( ) , 'March 2013' , 'Title is "March 2013"' ) ;
252
252
} ) ;
253
253
254
254
test ( 'by year, v4 (ctrl + shift + up/down arrows)' , function ( ) {
255
255
var target ;
256
256
257
257
equal ( this . dp . viewMode , 0 ) ;
258
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
258
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
259
259
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
260
260
261
261
// Navigation: -1 year, ctrl + up arrow key
@@ -269,7 +269,7 @@ test('by year, v4 (ctrl + shift + up/down arrows)', function(){
269
269
datesEqual ( this . dp . viewDate , UTCDate ( 2011 , 2 , 31 ) ) ;
270
270
datesEqual ( this . dp . date , UTCDate ( 2011 , 2 , 31 ) ) ;
271
271
// Month not changed
272
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
272
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
273
273
equal ( target . text ( ) , 'March 2011' , 'Title is "March 2011"' ) ;
274
274
275
275
// Navigation: +1 year, ctrl + down arrow key
@@ -282,15 +282,15 @@ test('by year, v4 (ctrl + shift + up/down arrows)', function(){
282
282
} ) ;
283
283
datesEqual ( this . dp . viewDate , UTCDate ( 2013 , 2 , 31 ) ) ;
284
284
datesEqual ( this . dp . date , UTCDate ( 2013 , 2 , 31 ) ) ;
285
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
285
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
286
286
equal ( target . text ( ) , 'March 2013' , 'Title is "March 2013"' ) ;
287
287
} ) ;
288
288
289
289
test ( 'by year, from leap day' , function ( ) {
290
290
var target ;
291
291
292
292
equal ( this . dp . viewMode , 0 ) ;
293
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
293
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
294
294
295
295
this . input . val ( '29-02-2012' ) . datepicker ( 'update' ) ;
296
296
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 1 , 29 ) ) ;
@@ -307,7 +307,7 @@ test('by year, from leap day', function(){
307
307
datesEqual ( this . dp . viewDate , UTCDate ( 2011 , 1 , 28 ) ) ;
308
308
datesEqual ( this . dp . date , UTCDate ( 2011 , 1 , 28 ) ) ;
309
309
// Month not changed
310
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
310
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
311
311
equal ( target . text ( ) , 'February 2011' , 'Title is "February 2011"' ) ;
312
312
313
313
// Navigation: +1 year, back to leap year
@@ -319,7 +319,7 @@ test('by year, from leap day', function(){
319
319
// Both updated on keyboard navigation; graceful month-end
320
320
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 1 , 28 ) ) ;
321
321
datesEqual ( this . dp . date , UTCDate ( 2012 , 1 , 28 ) ) ;
322
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
322
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
323
323
equal ( target . text ( ) , 'February 2012' , 'Title is "February 2012"' ) ;
324
324
325
325
// Navigation: +1 year
@@ -331,15 +331,15 @@ test('by year, from leap day', function(){
331
331
// Both updated on keyboard navigation; graceful month-end
332
332
datesEqual ( this . dp . viewDate , UTCDate ( 2013 , 1 , 28 ) ) ;
333
333
datesEqual ( this . dp . date , UTCDate ( 2013 , 1 , 28 ) ) ;
334
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
334
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
335
335
equal ( target . text ( ) , 'February 2013' , 'Title is "February 2013"' ) ;
336
336
} ) ;
337
337
338
338
test ( 'Selection (enter)' , function ( ) {
339
339
var target ;
340
340
341
341
equal ( this . dp . viewMode , 0 ) ;
342
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
342
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
343
343
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
344
344
345
345
// Navigation: -1 day, left arrow key
@@ -351,7 +351,7 @@ test('Selection (enter)', function(){
351
351
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 2 , 30 ) ) ;
352
352
datesEqual ( this . dp . date , UTCDate ( 2012 , 2 , 30 ) ) ;
353
353
// Month not changed
354
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
354
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
355
355
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
356
356
357
357
// Selection: Enter
@@ -363,7 +363,7 @@ test('Selection (enter)', function(){
363
363
datesEqual ( this . dp . viewDate , UTCDate ( 2012 , 2 , 30 ) ) ;
364
364
datesEqual ( this . dp . date , UTCDate ( 2012 , 2 , 30 ) ) ;
365
365
// Month not changed
366
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
366
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
367
367
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
368
368
369
369
ok ( this . picker . is ( ':not(:visible)' ) , 'Picker is hidden' ) ;
@@ -373,7 +373,7 @@ test('Toggle hide/show (escape); navigation while hidden is suppressed', functio
373
373
var target ;
374
374
375
375
equal ( this . dp . viewMode , 0 ) ;
376
- target = this . picker . find ( '.datepicker-days thead th.switch' ) ;
376
+ target = this . picker . find ( '.datepicker-days thead th.datepicker- switch' ) ;
377
377
equal ( target . text ( ) , 'March 2012' , 'Title is "March 2012"' ) ;
378
378
379
379
ok ( this . picker . is ( ':visible' ) , 'Picker is visible' ) ;
0 commit comments