title: value of input type="date" getting displayed in reverse direction
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(".dateTest").click(function(e){
      e.preventDefault();
      alert("The value of this field is currently set to: " + $(this).val());
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;form method="post"&gt;
      &lt;div&gt;
          &lt;label&gt;HTML-5: &lt;/label&gt;
          &lt;input  value="2012-10-01" type="date" id="dateFieldHtml5" class='dateTest'/&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;label&gt;HTML-4: &lt;/label&gt;
          &lt;input  value="10/01/2012" id="dateFieldHtml4"  class='dateTest'/&gt;
      &lt;/div&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I'm trying to write regular expression for <code>input type="date"</code> in form. The format which is getting displayed in frontend is <code>DD-MM-YYYY</code> but when I'm trying to print the <code>selected date value</code> before running my regular expression on it, its displaying in format <code>YYYY-MM-DD</code>. Because of this my regular expression is failing.
  See snippet</p>
  
  <p>Image of the displayed and selected date value.
  <a href="https://i.stack.imgur.com/c5ASO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c5ASO.png" alt="enter image description here"></a></p>
  
  <p>How can I make sure that the selected date gets displayed in same format.</p>