title: Use localized date format with date picker in cakephp 3
body: <p>I'm building a cakephp 3 app (cakephp v3.3.2 that is) and I have a problem getting dates displayed in the chosen locale (de_DE).  </p>
  
  <p>The database field in my example is <code>invoice_date</code>, which is of type DATE (stored in a mysql DB).</p>
  
  <p>I want to use a date picker in the web page ("zebra_datepicker"), so in the view I use a single text entry field for the date instead of the three drop-downs that are displayed by default:</p>
  
  <pre><code>echo $this-&gt;Form-&gt;input('invoice_date', [ 'type' =&gt; 'text' ]);
  </code></pre>
  
  <p>To get the date displayed in the German format <code>dd.mm.YY</code> I changed the global locale setting to</p>
  
  <pre><code>ini_set('intl.default_locale', 'de_DE');
  </code></pre>
  
  <p>in <code>config/bootstrap.php</code>.  </p>
  
  <p>For testing, I created a new record in the database and set the invoice_date to <code>2016-09-02</code> (Y-M-D).</p>
  
  <p>If I call the <code>edit</code> action of my controller now, I get a default value of <code>02.09.16</code> in the form, which is correct.  But if I submit the form back, the database value of the field is changed into <code>2002-09-16</code>!</p>
  
  <p>Do I need some extra code in the controller to change the date format back into its original form?  Is this a bug in the localization code of cakephp or did I miss something?  Note, that my controller just uses <code>patchEntity</code> to process the posted data.  </p>
  
  <p>I already tried adding <code>date('invoice_date', 'dmy')</code> in the validationDefault method of the table object, but this didn't change anything:</p>
  
  <pre><code>    $validator
          -&gt;date('invoice_date', 'dmy')
          -&gt;requirePresence('invoice_date', 'create')
          -&gt;notEmpty('invoice_date');
  </code></pre>
  
  <p>Thanks for your help!</p>