Hi there. I’m trying to get an inserted html form in Foundry to show the current date in a field. I’ve tried all kinds of routes (from plenty of Google searches) - does anyone have a clever solution to be able to do this?
I currently have this but it only seems to work in Safari. Both Firefox and Chrome insert a date picker which is odd?
Current HTML:
Javascript:
function TodayDate(){
let data= new Date();
return data.getFullYear().toString()+’-’ + (data.getMonth()+1).toString()+’-’ + data.getDate().toString()
}
document.getElementById(‘today’).innerHTML = ‘
’;
Any help gratefully received! Cheers