@@ -118,7 +118,14 @@ export class MyComponent implements AfterViewInit {
118
118
}
119
119
```
120
120
121
- ### Choosing a date implementation and date format settings
121
+ ### Internationalization
122
+ In order to support internationalization, the datepicker supports customization of the following
123
+ three pieces via injection:
124
+ 1 . The date implementation that the datepicker accepts.
125
+ 2 . The display and parse formats used by the datepicker.
126
+ 3 . The message strings used in the datepicker's UI.
127
+
128
+ #### Choosing a date implementation and date format settings
122
129
The datepicker was built to be date implementation agnostic. This means that it can be made to work
123
130
with a variety of different date implementations. However it also means that developers need to make
124
131
sure to provide the appropriate pieces for the datepicker to work with their chosen implementation.
@@ -148,6 +155,11 @@ export class MyComponent {
148
155
}
149
156
```
150
157
158
+ * Please note: ` MdNativeDateModule ` is based off of the functionality available in JavaScript's
159
+ native ` Date ` object, and is thus not suitable for many locales. One of the biggest shortcomings of
160
+ the native ` Date ` object is the inability to set the parse format. We highly recommend using a
161
+ custom ` DateAdapter ` that works with the formatting/parsing library of your choice.*
162
+
151
163
#### Customizing the date implementation
152
164
The datepicker does all of its interaction with date objects via the ` DateAdapter ` . Making the
153
165
datepicker work with a different date implementation is as easy as extending ` DateAdapter ` , and
@@ -183,7 +195,7 @@ formats.
183
195
export class MyApp {}
184
196
```
185
197
186
- ### Localizing labels and messages
198
+ #### Localizing labels and messages
187
199
The various text strings used by the datepicker are provided through ` MdDatepickerIntl ` .
188
200
Localization of these messages can be done by providing a subclass with translated values in your
189
201
application root module.
0 commit comments