You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -95,12 +99,53 @@ import { NgxMatDateFnsDateModule } from "ngx-mat-datefns-date-adapter";
95
99
provide: MAT_DATE_LOCALE,
96
100
useValue: "ja",
97
101
},
102
+
{
103
+
provide: NGX_MAT_DATEFNS_LOCALES,
104
+
useValue: [da, ja]
105
+
}
98
106
],
99
107
bootstrap: [AppComponent],
100
108
})
101
109
exportclassAppModule {}
102
110
```
103
111
112
+
## Default locale
113
+
114
+
When MAT_DATE_LOCALE and NGX_MAT_DATEFNS_LOCALES tokens are not provided, `en-US` locale is used by default. When empty or null value is provided to the MAT_DATE_LOCALE token, `en-US` locale is also used.
115
+
116
+
## Change locale dynamically
117
+
118
+
Use `setLocale()` method of the `DateAdapter`.
119
+
In case of using `setLocale` with a string argument, target locale should be imported into NGX_MAT_DATEFNS_LOCALES array.
0 commit comments