title: Date validation in Formik: 'Date of purchase' must be earlier than 'Date of sale'
body: <p>I am creating a simple form with date validation in React, Formik and Yup.</p>
  
  <p>As you can see below, there are only two fields: <code>datePurchase</code> and <code>dateSale</code>. I set <code>min</code> and <code>max</code> parameters for both and I set them as required:</p>
  
  <pre><code>&lt;Formik
    initialValues={{
      datePurchase: '',
      dateSale: '',
    }}
    validationSchema={object()
      .shape({
        datePurchase: date()
          .min(new Date('01-01-2019'))
          .max(new Date())
          .required(),
        dateSale: date()
          .min(new Date('01-01-2019'))
          .max(new Date())
          .required(),
      })}
  &gt;
    {({
      values, handleChange, handleBlur,
    }) =&gt; (
        &lt;Form&gt;
          &lt;input
            name="datePurchase"
            type="date"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.datePurchase}
          /&gt;
          &lt;input
            name="dateSale"
            type="date"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.dateSale}
          /&gt;
        &lt;/Form&gt;
      )}
  &lt;/Formik&gt;
  
  </code></pre>
  
  <p>Then, I realized that <code>datePurchase</code> must be earlier than <code>dateSale</code>.</p>
  
  <p>How to implement such condition using <code>validationSchema()</code> with Yup? Is that even possible?</p>
  
  <p>I tried to use <code>when()</code> method with <code>is:</code> and <code>then:</code> params from Yup documentation, but to no avail. </p>