Using an HTML input type=\"date\" and a submit button. I would like to populate the variables day, month, and year with t
Firstly you need to create a Date object from input element value. And then you will be able to get day, month and year from this object.
$('#submit').on('click', function(){
var date = new Date($('#date-input').val());
day = date.getDate();
month = date.getMonth() + 1;
year = date.getFullYear();
alert([day, month, year].join('/'));
});
Working example: https://jsfiddle.net/8poLtqvp/