JSFiddle - React, Tailwind, and code Playground

by akmiecik

HTML

<body>
	<input type="date" id="date_today">
</body>

JavaScript

window.onload = function() {

const d = new Date();
const month = d.getMonth()+1;
const date = d.getDate();
const year = d.getFullYear(); 
const current_date = `${month}.${date}.${year}`;


document.getElementById('date_today').attr("value", current_date);

};