title: undefined is not an object (evaluating '_this.props.date.getFullYear')
body: <p>I encountered a error like this :  </p>
  
  <p><a href="https://i.stack.imgur.com/QuX7v.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QuX7v.jpg" alt="enter image description here"></a></p>
  
  <p>and these are my code </p>
  
  <pre><code>export default class StarView extends Component{
  static propTypes = {
      date : React.PropTypes.instanceOf(Date)
  }
  constructor(props){
      super(props);
      this.state = {
          selectedYear: this.props.date.getFullYear(),
          selectedMonth: this.props.date.getMonth(),
          selectedDate: this.props.date.getDate(),
          yesterdayYear : new Date(this.props.date.getTime() - 24 * 3600 * 1000).getFullYear(),
          yesterdayMonth: new Date(this.props.date.getTime() - 24 * 3600 * 1000).getMonth(),
          yesterdatDate : new Date(this.props.date.getTime() - 24 * 3600 * 1000).getDate(),
          tomorrowYear : new Date(this.props.date.getTime() + 24 * 3600 *1000).getFullYear(),
          tomorrowMonth : new Date(this.props.date.getTime() + 24 * 3600 *1000).getMonth(),
          tomorrowDate : new Date(this.props.date.getTime() + 24 * 3600 *1000).getDate()
      }
  }}
  </code></pre>
  
  <p>I want get a default data from this.props.date ,but I don't know the reason I get the error</p>