Created
March 5, 2018 19:00
-
-
Save jonpemby/f000be057a5f509d55e0f1d36f1e002c to your computer and use it in GitHub Desktop.
Format a JavaScript date for HTML5 "date" input value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelector('.datepicker').value = (new Date()).toISOString().substr(0, 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment