Skip to content

Commit

Permalink
Fixed Date time picker always displaying 12AM (#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aatish Nayak authored Mar 21, 2017
1 parent 614f928 commit 1a843dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/initialize_datetimepickers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$(datetimeElts[i]).flatpickr({
enableTime: true,
altInput: true,
defaultDate: moment($(datetimeElts[i]).val()).format("MMMM D YYYY, h:mm A")
defaultDate: new Date(datetimeElts[i].getAttribute("value"))
})
}

Expand Down

0 comments on commit 1a843dc

Please sign in to comment.