Created
November 26, 2017 08:07
-
-
Save Ashley-Upson/e21d7bd0cc8e73c9e9b346e758e985c3 to your computer and use it in GitHub Desktop.
Facebook help - splitting a value into an array.
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
<script type="text/javascript"> | |
var dates = document.getElementById("dates_input").value, | |
dates_split = dates.split(" - "), | |
start_date = dates_split[0], | |
end_date = dates_split[1]; | |
console.log("First date: " + start_date); | |
console.log("Second date: " + end_date); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment