date html input format change code example
Example 1: change date format in html
<input type="date" name="begin"
placeholder="dd-mm-yyyy" value=""
min="1997-01-01" max="2030-12-31">
Example 2: input type date on change
var date_input = document.getElementById('date_input');
date_input.valueAsDate = new Date();
date_input.onchange = function(){
console.log(this.value);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="date" id='date_input'>