title: manually enter the date by typing in keyboard
body: <ul>
  <li>I am using rc calendar package <a href="https://www.npmjs.com/package/rc-calendar" rel="nofollow noreferrer">https://www.npmjs.com/package/rc-calendar</a></li>
  <li>when i try to remove 9 from 2019 and change it to 2018 itys working.</li>
  <li>but when delete the whole date 1/15/2019 its not allowing.</li>
  <li>I am trying to manually enter the date by typing in keyboard.</li>
  <li>all my date changes are in the method handleChange(date)</li>
  <li>Can you tell me how to fix it, so that in future I will fix it myself.</li>
  <li>Providing my sandbox and code snippet below.</li>
  </ul>
  
  <p><a href="https://stackblitz.com/edit/react-tch9tf?file=demo.js" rel="nofollow noreferrer">https://stackblitz.com/edit/react-tch9tf?file=demo.js</a></p>
  
  <pre><code>class CalendarPage extends Component {
    constructor(props) {
      super(props);
  
      this.state = {
        date: new Date(),
        dateValue: '',
      };
      this.handleChange = this.handleChange.bind(this);
    }
  
    handleChange(date) {
      console.log(date);
      console.log(moment(date));
      if (moment(date) != 'Invalid date') {
  
        if (date != null) {
          console.log('valid Date');
          this.setState({
            date: date
          });
          this.setState({
            dateValue: moment(date).format('MM-DD-YYYY')
          });
        } else {
          this.setState({
            dateValue: ''
          });
        }
      }
    }
  
  
  
    render() {
      const calendar = (&lt;Calendar /&gt;);
      return (
        &lt;div&gt;
          &lt;DatePicker
            animation="slide-up"
            value={moment(this.state.date)}
            disabled={false}
            calendar={calendar}
            onChange={this.handleChange}
          &gt;{
              ({ value }) =&gt; {
                return (
                  &lt;input value={this.state.dateValue} /&gt;
                )
              }
            }&lt;/DatePicker&gt;
        &lt;/div&gt;
      )
    }
  }
  </code></pre>