We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 616dc97 commit c24b583Copy full SHA for c24b583
1 file changed
docs/src/app/components/pages/components/DatePicker/ExampleToggle.js
@@ -1,8 +1,17 @@
1
import React from 'react';
2
import DatePicker from 'material-ui/DatePicker';
3
import Toggle from 'material-ui/Toggle';
4
+import areIntlLocalesSupported from 'intl-locales-supported';
5
-const DateTimeFormat = global.Intl.DateTimeFormat;
6
+let DateTimeFormat;
7
+
8
+if (areIntlLocalesSupported(['en-US'])) {
9
+ DateTimeFormat = global.Intl.DateTimeFormat;
10
+} else {
11
+ const IntlPolyfill = require('intl');
12
+ DateTimeFormat = IntlPolyfill.DateTimeFormat;
13
+ require('intl/locale-data/jsonp/en-US');
14
+}
15
16
const optionsStyle = {
17
maxWidth: 255,
0 commit comments