Skip to content

Instantly share code, notes, and snippets.

@fauverism
Created January 8, 2016 21:16
Show Gist options
  • Save fauverism/aab13e496683d5316e87 to your computer and use it in GitHub Desktop.
Save fauverism/aab13e496683d5316e87 to your computer and use it in GitHub Desktop.
format a string back to a date value to show in an input with type=date
val = moment(val, "YYYY-MM-DD").format('L');
val = new Date(val);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment