JSFiddle - React, Tailwind, and code Playground

by abhishekjain

HTML

<input type="text" id="pmtDate"/>

JavaScript

var currentDate = new Date();
window.document.getElementById('pmtDate').setAttribute('value', getDate());
                                                       
                                                       
function getDate(){
    return currentDate.toString();
}