title: how to properly transform date to string and back in symfony form so can use date picker
body: <p>In my Symfony 4 app, I have an entity that includes a Date type field.  By default, Symfony presents this as a set of select boxes for month, day, year.  I've changed that to a text widget so that I can use a jQuery UI date picker.</p>
  
  <p>But I'm running into problems trying to submit the form.</p>
  
  <p>Here's the field on my entity:</p>
  
  <pre><code>/**
   * @ORM\Column(type="date")
   */
  private $start_date;
  </code></pre>
  
  <p>Here's how I'm displaying the field:</p>
  
  <pre><code>$builder-&gt;add('start_date', DateType::class, [
                  'widget' =&gt; 'single_text',
  
                  // prevents rendering it as type="date", to avoid HTML5 date pickers
                  'html5' =&gt; false,
  
                  // adds a class that can be selected in JavaScript
                  'attr' =&gt; ['class' =&gt; 'js-datepicker'],
              ])
  </code></pre>
  
  <p>With jquery and jqueryui on my page, this is allowing a datepicker to display. </p>
  
  <p>Here's how I'm currently experimenting with converting from date to string and vice-versa.  At the moment, I'm just trying to use a hard-coded date, which of course I'll change once I have a clue what I'm doing.</p>
  
  <pre><code>$builder-&gt;get('start_date')
  -&gt;addModelTransformer(new CallbackTransformer(
      function ( $dateAsString ) {
          return new \DateTime('2019-01-01');
      },
      function ( $dateAsDate ) {
          return '2019-01-01';
      }
  ));
  </code></pre>
  
  <p>Submitting the form produces this error:
  Expected argument of type "DateTimeInterface", "string" given.</p>
  
  <p>Does anyone have any ideas how I can store the date in my entity as a date type while presenting it as a string in my form?</p>