title: React Testing Library: Unable to Change Material UI DatePicker Input Value
body: <p>I'm trying to change the value of the Material UI Datepicker Input with React Testing Library. But it doesn't seem to work with <code>fireEvent.change()</code>.</p>
  <pre class="lang-js prettyprint-override"><code>import React from &quot;react&quot;;
  import { render, screen, waitFor, fireEvent } from &quot;@testing-library/react&quot;;
  
  import MomentUtils from &quot;@date-io/moment&quot;;
  import { DatePicker, MuiPickersUtilsProvider } from &quot;@material-ui/pickers&quot;;
  
  describe(&quot;DatePicker&quot;, () =&gt; {
      test(&quot;Change datepicker value&quot;, async () =&gt; {
          render(
              &lt;MuiPickersUtilsProvider utils={MomentUtils}&gt;
                  &lt;DatePicker
                      label=&quot;Start Date&quot;
                      id=&quot;startDate&quot;
                      onChange={(date) =&gt; {
                          return undefined;
                      }}
                      value={new Date()}
                      format={&quot;yyyy/MM/DD&quot;}
                  /&gt;
              &lt;/MuiPickersUtilsProvider&gt;
          );
  
          const startDateInput = (await screen.findByLabelText(&quot;Start Date&quot;)) as HTMLInputElement;
          screen.debug(startDateInput);
          fireEvent.change(startDateInput, { target: { value: &quot;2021/01/01&quot; } });
          expect(startDateInput.value).toBe(&quot;2021/01/01&quot;);
      });
  </code></pre>
  <p>Here is what jest reports:</p>
  <pre><code>console.log
      &lt;input
        aria-invalid=&quot;false&quot;
        class=&quot;MuiInputBase-input MuiInput-input&quot;
        id=&quot;startDate&quot;
        readonly=&quot;&quot;
        type=&quot;text&quot;
        value=&quot;2021/08/01&quot;
      /&gt;
  
  expect(received).toBe(expected) // Object.is equality
  
      Expected: &quot;2021/01/01&quot;
      Received: &quot;2021/08/27&quot;
  </code></pre>
  <p>Any suggestions are appreciated :)</p>