title: How can I change the state submitting a form in React?
body: <p>I am trying to update state when I submit my form. However when I submit the state shows date:HTMLInputElement</p>
  
  <p>I'm planning on using the date submitted to display a picture from that day from NASA's api.</p>
  
  <p>I'm new to React so i'm still trying to get my head around it.</p>
  
  <p>But shouldn't the state of the date property show the date when I submit the form in the console?</p>
  
  <pre><code>class DisplayContent extends React.Component {
      constructor(props){
          super(props)
  
      this.state = {
          date: ''
      }
  
      this.handleChange = this.handleChange.bind(this)
      this.handleSubmit = this.handleSubmit.bind(this)
      }
      handleSubmit(e){
          e.preventDefault()
          this.setState({ date: e.target.date })
      }
         handleChange(e){
          this.setState ({
                date: e.target.value
       })
      }   
      render(){
          return(
              &lt;div className='container'&gt;
              &lt;h1&gt;NASA Picture of the Day&lt;/h1&gt;
              &lt;h3&gt;Enter a date and you'll see NASA's picture from that day&lt;/h3&gt;
              &lt;form onSubmit={this.handleSubmit}&gt;
              (YYYY-MM-DD):
                  &lt;input 
                  type='text'
                  id='date'
                  placeholder='input date'
                  value={this.state.date}
                  onChange={this.handleChange}
                  /&gt;
                  &lt;button 
                  type='submit'
                  disabled={!this.state.date}
                  &gt;
                  Submit
                  &lt;/button&gt;
              &lt;/form&gt;
             &lt;/div&gt;
  </code></pre>