title: Cannot read property 'moment' of undefined
body: <p>I have a problem with momentjs and I have no idea why. I wrote this code a couple of days ago and it worked fine then, but today I got this error: <code>Unhandled Rejection (TypeError): Cannot read property 'moment' of undefined</code>. </p>
  
  <pre><code>import React, { Component } from 'react'
  
  import moment from 'moment'
  import Datetime from 'react-datetime'
  import './react-datetime.css'
  
  let parseDate = str =&gt; {
    if (moment(str).isValid()) {
      return moment(str).toISOString()
    } else {
      return moment(str).toISOString()
    }
  }
  
  export default class DateInput extends Component {
    render() {
      const yesterday = Datetime.moment().subtract(1, 'day') //Error occur on this line.
      const valid = current =&gt; {
        return current.isAfter(yesterday)
      }
  
      const Datetime = (
        &lt;div&gt;
          &lt;Datetime
            isValidDate={valid}
            timeFormat="HHmm"
            dateFormat="YYYY-MM-DD"
            onChange={e =&gt; {
              this.props.onChange(parseDate(e._d))
            }}
          /&gt;
        &lt;/div&gt;
      )
      if (this.props.value) {
        return { Datetime }
      } else {
        return &lt;p&gt;Inget datum angivet&lt;/p&gt;
      }
    }
  }
  </code></pre>
  
  <p>I bet the problem is really basic, but I have no idea why this is happening.</p>
  
  <p>Thanks for reading and I hope we can solve it! </p>