File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import {By} from '@angular/platform-browser';
8
8
import { dispatchFakeEvent , dispatchMouseEvent } from '../core/testing/dispatch-events' ;
9
9
import { MdInputModule } from '../input/index' ;
10
10
import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
11
- import { MdNativeDateModule } from '../core/datetime/index' ;
11
+ import { MdNativeDateModule , DateAdapter , NativeDateAdapter } from '../core/datetime/index' ;
12
12
13
13
14
14
// When constructing a Date, the month is zero-based. This can be confusing, since people are
@@ -29,6 +29,13 @@ describe('MdDatepicker', () => {
29
29
NoopAnimationsModule ,
30
30
ReactiveFormsModule ,
31
31
] ,
32
+ providers : [
33
+ { provide : DateAdapter , useFactory : ( ) => {
34
+ let adapter = new NativeDateAdapter ( ) ;
35
+ adapter . setLocale ( 'en-US' ) ;
36
+ return adapter ;
37
+ } }
38
+ ] ,
32
39
declarations : [
33
40
DatepickerWithFilterAndValidation ,
34
41
DatepickerWithFormControl ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import {Component} from '@angular/core';
3
3
import { By } from '@angular/platform-browser' ;
4
4
import { MdMonthView } from './month-view' ;
5
5
import { MdCalendarBody } from './calendar-body' ;
6
- import { MdNativeDateModule } from '../core/datetime/index' ;
6
+ import { MdNativeDateModule , DateAdapter , NativeDateAdapter } from '../core/datetime/index' ;
7
7
8
8
9
9
// When constructing a Date, the month is zero-based. This can be confusing, since people are
@@ -18,6 +18,13 @@ describe('MdMonthView', () => {
18
18
imports : [
19
19
MdNativeDateModule ,
20
20
] ,
21
+ providers : [
22
+ { provide : DateAdapter , useFactory : ( ) => {
23
+ let adapter = new NativeDateAdapter ( ) ;
24
+ adapter . setLocale ( 'en-US' ) ;
25
+ return adapter ;
26
+ } }
27
+ ] ,
21
28
declarations : [
22
29
MdCalendarBody ,
23
30
MdMonthView ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import {Component} from '@angular/core';
3
3
import { By } from '@angular/platform-browser' ;
4
4
import { MdYearView } from './year-view' ;
5
5
import { MdCalendarBody } from './calendar-body' ;
6
- import { MdNativeDateModule } from '../core/datetime/index' ;
6
+ import { MdNativeDateModule , DateAdapter , NativeDateAdapter } from '../core/datetime/index' ;
7
7
8
8
9
9
// When constructing a Date, the month is zero-based. This can be confusing, since people are
@@ -18,6 +18,13 @@ describe('MdYearView', () => {
18
18
imports : [
19
19
MdNativeDateModule ,
20
20
] ,
21
+ providers : [
22
+ { provide : DateAdapter , useFactory : ( ) => {
23
+ let adapter = new NativeDateAdapter ( ) ;
24
+ adapter . setLocale ( 'en-US' ) ;
25
+ return adapter ;
26
+ } }
27
+ ] ,
21
28
declarations : [
22
29
MdCalendarBody ,
23
30
MdYearView ,
You can’t perform that action at this time.
0 commit comments