title: Change date format to ISO 8601 using jquery
body: <p>I have 2 input fields that when a user inputs the date in say mm-dd-yyyy format, i would like to have it automatically change to yyyy-mm-dd (ISO 8601 Date Format) </p>
  
  <p>the input fields are very simple:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
          &lt;label for="purchase_date"&gt;Purchase Date &lt;font size="-3"&gt;(Year-MM-DD) format&lt;/font&gt;&lt;/label&gt;
          &lt;input type="text" name="purchase_date" class="form-control"  placeholder="Purchase Date"&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
          &lt;label for="warranty_end_date"&gt;Warranty End Date &lt;font size="-3"&gt;(Year-MM-DD) format&lt;/font&gt;&lt;/label&gt;
          &lt;input type="text" name="warranty_end_date" class="form-control"  placeholder="Warranty End Date"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>is there a way to do this without using datepicker?  I dont want to add any extra styling sheets or any extra js..</p>