Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

set datetime-local value javascript

var now = new Date();
now.setMinutes(now.getMinutes() - now.getTimezoneOffset());
document.getElementById('dt').value = now.toISOString().slice(0,16);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #javascript
ADD COMMENT
Topic
Name
5+4 =