title: How to format the returned date input value from a jQuery datepicker in order to match mysql DATE field?
body: <p>I have a form with a jQuery datepicker. I have set the date format to the European way: <code>dd-mm-yy</code> in order to make it look nice for the user. However this date value eventually needs to be formatted back in <strong>PHP</strong> to <code>yy-mm-dd</code> so that in can be stored in my <strong>mysql DATE field</strong>. Here is my code:
  <br /> <br /><strong>Jquery:</strong></p>
  
  <pre><code>   $("document").ready(function(){
  
      $(function() {
      $( ".datepicker" ).datepicker({
          monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
                       'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
          dayNamesMin: ['Zo', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za'],
          dateFormat:'dd-mm-yy',
          });
  });
  </code></pre>