Skip to content

Commit 1a843dc

Browse files
author
Aatish Nayak
authored
Fixed Date time picker always displaying 12AM (#811)
1 parent 614f928 commit 1a843dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/assets/javascripts/initialize_datetimepickers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
$(datetimeElts[i]).flatpickr({
88
enableTime: true,
99
altInput: true,
10-
defaultDate: moment($(datetimeElts[i]).val()).format("MMMM D YYYY, h:mm A")
10+
defaultDate: new Date(datetimeElts[i].getAttribute("value"))
1111
})
1212
}
1313

0 commit comments

Comments
 (0)