Using an HTML input type=\"date\" and a submit button. I would like to populate the variables day, month, and year with t
Date class will convert input data into date type. Then getMonth() gives us value from 0-11 so we can either consider January as 0 or we can add 1 to received value that's what I did here.
Here I just used Jquery to fetch date, months and year respectively and if you want to post the data you can convert that values into string.