title: datepicker change date format on form submit
body: <p>I am using jQuery datepicker, and I am displaying my date in</p>
  
  <blockquote>
    <p>dd-mm-yyyy</p>
  </blockquote>
  
  <p>format but I need to send date in </p>
  
  <blockquote>
    <p>yyyy-mm-dd</p>
  </blockquote>
  
  <p>format to store in database.</p>
  
  <pre><code>$(document).ready(function(){
      $('.datepicker').datepicker({
          format : 'dd-mm-yyyy',
          maxDate : new Date(),
          selectMonths : true,
          selectYears: d,
          yearRange: 100 ,
      }); 
  });
  </code></pre>
  
  <p>the above code will show date format </p>
  
  <blockquote>
    <p>dd-mm-yy</p>
  </blockquote>
  
  <p>and when I submit the form using ajax, it sends using this same format. I need to change the submit format to </p>
  
  <blockquote>
    <p>yyyy-mm-dd</p>
  </blockquote>
  
  <p>Check this <a href="https://jsfiddle.net/prashanthviru/b42dzwLb/" rel="nofollow noreferrer">fiddle</a>.</p>