title: How to get Material-UI Date Picker value
body: <p>I am using material-ui datepicker. What i am trying to do is get the value selected by the user and set it to state however i am struggling to figure this out so any help would be much appreciated. </p>
  
  <p>So here is what i am doing at the moment: </p>
  
  <p>My datepicker component looks like this:</p>
  
  <pre><code>&lt;DatePicker
    hintText="Select the date"
    formatDate={(date) =&gt; moment(date).format('DD-MM-YYYY')}
    onChange={this.handleChange1.bind(this)} /&gt;
  </code></pre>
  
  <p>the handleChange1 function: </p>
  
  <pre><code>handleChange1(e, date){
   this.setState({
     appointmentDate: date.value
  })
   console.log(e, date);
   console.log(this.state.appointmentDate;
  }
  </code></pre>
  
  <p>The Constructor: </p>
  
  <pre><code>constructor(props){
   super(props);
    this.state = {
     appointmentDate: '',
     appointmentTime: ''
   };
  </code></pre>
  
  <p>All of the above give me the following in the console....</p>
  
  <pre><code>null Fri Oct 20 2017 16:50:33 GMT+0100 (BST)
  </code></pre>
  
  <p>AND</p>
  
  <pre><code> _blank log_     
  </code></pre>
  
  <p>However, in the textfield once the user selects the date i can see the date being rendered correctly like 20-10-2017</p>
  
  <p>The date being displayed to the user is what i want to store to state.
  Can someone explain how this can be achieved? </p>
  
  <p>Thanks</p>