Bootstrap Datepicker convert format from dd.mm.yyyy to yyyy-mm-dd before inserting to MySQL
<p>Is there a fairly simple way to convert the format of Bootstrap Datepicker before inserting the data to database?</p>

<p>My page had the HTML5 date input until I realized it was only working in Chrome.</p>

<p>The thing is I need to display the data on the webpage in a norwegian/european format: dd.mm.yyyy and then insert the value as a "default" date (yyyy-mm-dd) to MySQL. Column in database is Date type.</p>

<p>I'm not good at javascript, so I'm hoping there's a simple addon to the script that fixes this.</p>

<pre><code>&lt;!-- Datepicker JS --&gt;
&lt;script src="datepicker/js/bootstrap-datepicker.js"&gt;&lt;/script&gt;
&lt;script src="datepicker/locales/bootstrap-datepicker.no.min.js" charset="UTF-8"&gt;&lt;/script&gt;

&lt;script type="text/javascript"&gt;
  $(function () {
  $('#date').datepicker({
  locale: 'no'
  });
});
&lt;/script&gt;

&lt;div class="col-md-2 form-group"&gt;
        &lt;label for="date"&gt;Date&lt;/label&gt;
        &lt;input type="text" class="form-control input-sm" name="date" id="date" data-provide="datepicker"&gt;
&lt;/div&gt;
</code></pre>