Initialize react-dates in index.js

This commit is contained in:
Vesa Luusua 2018-01-30 19:10:27 +02:00
parent 7ad1ea557f
commit 0edd574cf6
5 changed files with 15 additions and 10 deletions

View file

@ -1,6 +1,11 @@
import React from 'react';
import PropTypes from 'prop-types';
import ReactDOMServer from 'react-dom/server';
// react-dates needs to be initialized before using any react-dates component
// https://github.com/airbnb/react-dates#initialize
// NOTE: Initializing it here will initialize it also for app.test.js
import 'react-dates/initialize';
import Helmet from 'react-helmet';
import { BrowserRouter, StaticRouter } from 'react-router-dom';
import { Provider } from 'react-redux';

View file

@ -6,11 +6,6 @@
*/
import React, { Component } from 'react';
import { bool, func, instanceOf, shape, string } from 'prop-types';
// react-dates needs to be initialized before using any react-dates component
// Since this is currently only component using react-dates we can do it here
// https://github.com/airbnb/react-dates#initialize
import 'react-dates/initialize';
import { SingleDatePicker, isInclusivelyAfterDay, isInclusivelyBeforeDay } from 'react-dates';
import { intlShape, injectIntl } from 'react-intl';
import classNames from 'classnames';

View file

@ -1,4 +1,9 @@
import React from 'react';
// react-dates needs to be initialized before using any react-dates component
// Since this is currently only component using react-dates we can do it here
// https://github.com/airbnb/react-dates#initialize
import 'react-dates/initialize';
import { renderDeep } from '../../util/test-helpers';
import { DateInput } from './FieldDateInput';

View file

@ -6,11 +6,6 @@
*/
import React, { Component } from 'react';
import { bool, func, instanceOf, oneOf, shape, string } from 'prop-types';
// react-dates needs to be initialized before using any react-dates component
// Since this is currently only component using react-dates we can do it here
// https://github.com/airbnb/react-dates#initialize
import 'react-dates/initialize';
import { DateRangePicker, isInclusivelyAfterDay, isInclusivelyBeforeDay } from 'react-dates';
import { intlShape, injectIntl } from 'react-intl';
import classNames from 'classnames';

View file

@ -1,4 +1,9 @@
import React from 'react';
// react-dates needs to be initialized before using any react-dates component
// Since this is currently only component using react-dates we can do it here
// https://github.com/airbnb/react-dates#initialize
import 'react-dates/initialize';
import { renderDeep } from '../../util/test-helpers';
import { LINE_ITEM_NIGHT } from '../../util/types';
import { DateRangeInput } from './FieldDateRangeInput';