@@ -1276,21 +1276,21 @@ describe('datepicker directive', function () {
1276
1276
} ) ;
1277
1277
1278
1278
it ( 'updates the model & calendar when input value changes' , function ( ) {
1279
- changeInputValueTo ( inputEl , 'March 5, 1980 ' ) ;
1279
+ changeInputValueTo ( inputEl , '2010-09-15 ' ) ;
1280
1280
1281
- expect ( $rootScope . date . getFullYear ( ) ) . toEqual ( 1980 ) ;
1282
- expect ( $rootScope . date . getMonth ( ) ) . toEqual ( 2 ) ;
1283
- expect ( $rootScope . date . getDate ( ) ) . toEqual ( 5 ) ;
1281
+ expect ( $rootScope . date . getFullYear ( ) ) . toEqual ( 2010 ) ;
1282
+ expect ( $rootScope . date . getMonth ( ) ) . toEqual ( 8 ) ;
1283
+ expect ( $rootScope . date . getDate ( ) ) . toEqual ( 15 ) ;
1284
1284
1285
1285
expect ( getOptions ( true ) ) . toEqual ( [
1286
- [ '24 ' , '25 ' , '26 ' , '27 ' , '28 ' , '29 ' , '01 ' ] ,
1287
- [ '02 ' , '03 ' , '04 ' , '05 ' , '06 ' , '07 ' , '08 ' ] ,
1288
- [ '09 ' , '10 ' , '11 ' , '12 ' , '13 ' , '14 ' , '15 ' ] ,
1289
- [ '16 ' , '17 ' , '18 ' , '19 ' , '20 ' , '21 ' , '22 ' ] ,
1290
- [ '23 ' , '24 ' , '25 ' , '26 ' , '27 ' , '28 ' , '29 ' ] ,
1291
- [ '30 ' , '31 ' , '01 ' , '02 ' , '03 ' , '04 ' , '05 ' ]
1286
+ [ '29 ' , '30 ' , '31 ' , '01 ' , '02 ' , '03 ' , '04 ' ] ,
1287
+ [ '05 ' , '06 ' , '07 ' , '08 ' , '09 ' , '10 ' , '11 ' ] ,
1288
+ [ '12 ' , '13 ' , '14 ' , '15 ' , '16 ' , '17 ' , '18 ' ] ,
1289
+ [ '19 ' , '20 ' , '21 ' , '22 ' , '23 ' , '24 ' , '25 ' ] ,
1290
+ [ '26 ' , '27 ' , '28 ' , '29 ' , '30 ' , '01 ' , '02 ' ] ,
1291
+ [ '03 ' , '04 ' , '05 ' , '06 ' , '07 ' , '08 ' , '09 ' ]
1292
1292
] ) ;
1293
- expectSelectedElement ( 10 ) ;
1293
+ expectSelectedElement ( 17 ) ;
1294
1294
} ) ;
1295
1295
1296
1296
it ( 'closes when click outside of calendar' , function ( ) {
@@ -1389,7 +1389,7 @@ describe('datepicker directive', function () {
1389
1389
} ) ) ;
1390
1390
1391
1391
it ( 'should change model and update calendar after debounce timeout' , function ( ) {
1392
- changeInputValueTo ( inputEl , 'March 5, 1980' ) ;
1392
+ changeInputValueTo ( inputEl , '1980-03-05 ' ) ;
1393
1393
1394
1394
expect ( $rootScope . date . getFullYear ( ) ) . toEqual ( 2010 ) ;
1395
1395
expect ( $rootScope . date . getMonth ( ) ) . toEqual ( 9 - 1 ) ;
0 commit comments