title: Showing Invalid date in input field
body: <p>I am trying to change the default date format to DD/MM/YYYY. I have successfully did this. But it showing invalid date. When I select a date it's work well. But when I clear the date it's shows Invalid Date. How can I remove this error message.</p>
  
  <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>$("input").on("change", function() {
      this.setAttribute(
          "data-date",
          moment(this.value, "YYYY-MM-DD")
          .format( this.getAttribute("data-date-format") )
      )
  }).trigger("change")</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>input {
      position: relative;
      width: 150px; height: 20px;
      color: black;
  }
  
  input:before {
      position: absolute;
      top: 5px; left: 6px;
      content: attr(data-date);
      display: inline-block;
      color: black;
  }
  
  input::-webkit-datetime-edit, input::-webkit-inner-spin-button, input::-webkit-clear-button {
      display: none;
  }
  
  input::-webkit-calendar-picker-indicator {
      position: absolute;
      top: 16px;
      right: 0;
      color: black;
      opacity: 1;
  }</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;script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.3/moment.min.js"&gt;&lt;/script&gt;
  &lt;input type="date" data-date="" placeholder="s" data-date-format="DD/MM/YYYY"  name="tckt_issue_date"&gt;</code></pre>
  </div>
  </div>
  </p>