title: Compare two dates using datepicker in react-redux
body: <p>i have a DateInput component which i use in my redux form:</p>
  
  <pre><code>const MyDatePicker = ({ input, meta: { touched, error } }) =&gt; (
    &lt;div&gt;
      &lt;DatePicker
        {...input} dateFormat="DD-MM-YYYY"
        selected={input.value ? moment(input.value, 'DD-MM-YYYY') : null}
      /&gt;
      {touched &amp;&amp; error &amp;&amp; &lt;span&gt;{error}&lt;/span&gt;}
    &lt;/div&gt;
  );
  </code></pre>
  
  <p>How to compare two dates which are produced by this component? I'm trying the isAfter function from moment.js but it didnt work</p>