title: Min and Max Date in Material UI DatePicker in React
body: <p>I have a condition wherein if <code>access</code> value is 1 then there's no restriction in selecting dates. However if the value of <code>access</code> is not 1 then you can only select today. My problem is that I can't select other months even if the value of <code>access</code> is 1. I can only select from within the month. How can I fix this?</p>
  <p>Please see my code here.</p>
  <pre><code>&lt;KeyboardDatePicker
    minDate={access !== 1 ? new Date() : &quot;&quot;}
    maxDate={access !== 1 ? new Date() : &quot;&quot;}
    fullWidth
    InputLabelProps={{ shrink: true }}
    inputVariant=&quot;outlined&quot;
    id=&quot;date-picker-dialog&quot;
    label=&quot;Select Date&quot;
    format=&quot;MM/dd/yyyy&quot;
    clearable
    value={values.start_date}
    onChange={(val) =&gt; {
      setFieldValue(&quot;start_date&quot;, val);
    }}
    onBlur={handleBlur}
    helperText={touched.start_date ? errors.start_date : &quot;&quot;}
    error={touched.start_date &amp;&amp; Boolean(errors.start_date)}
    TextFieldComponent={TextFieldComponent}
  /&gt;;
  </code></pre>