Last active
August 29, 2015 14:20
-
-
Save alexkirsz/78fe94eb84451a55ba9e to your computer and use it in GitHub Desktop.
Date to/from date and time inputs
This file contains 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
let [date, time] = dateObj.toISOString().split('T'); | |
time = time.split('.')[0].split(':').slice(0, 2).join(':'); | |
let dateObj = new Date(`${date}T${time}.000Z`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment