Answers for "set datetime-local value javascript"

0

set datetime-local value javascript

var now = new Date();
now.setMinutes(now.getMinutes() - now.getTimezoneOffset());
document.getElementById('dt').value = now.toISOString().slice(0,16);
Posted by: Guest on October-12-2021
0

set datetime-local value javascript

<input id="dt" type="datetime-local" />
 Run code snippetHide results
Posted by: Guest on October-12-2021

Code answers related to "set datetime-local value javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language