I've come up with using a function on page load:
function getDate() {
let currentDate = new Date();
let year = currentDate.getFullYear();
let month = currentDate.getMonth() + 1;
if (month < 10) {
month = "0" + month
}
let day = currentDate.getDate();
let today = year + '-' + month + '-' + day
return today
}
Once the page loads, the return value is inserted into the value parameter. The function just looks really messy, is there a more concise way to do this?