title: how to get value in react datepicker format yyyy-mm-dd
body: <p>I have a datepicker react js component, which is in the form of yyyy-MM-dd, but why does it invalid time value when I only use the data</p>
  
  <pre><code>const date = moment().format("yyyy-MM-dd");
  
  class Register extends Component {
  
    constructor(props) {
      super(props)
      this.state = {
        BIRTH_OF_DATE:date
      }
    }
  
    render(){
     return(
       &lt;DatePicker
        showPopperArrow={false}
        selected={this.state.BIRTH_OF_DATE}
        onChange={(newDate) =&gt; this.setState({BIRTH_OF_DATE:newDate})}
      /&gt;
     )
    }
  }
  </code></pre>