diff --git a/opentech/apply/activity/templates/activity/include/listing_base.html b/opentech/apply/activity/templates/activity/include/listing_base.html index 2d2e7bdaf3959e0476c0f430a3eaaae416296e9d..763e6e6119c40f8826b92eba99f286e555b48ccb 100644 --- a/opentech/apply/activity/templates/activity/include/listing_base.html +++ b/opentech/apply/activity/templates/activity/include/listing_base.html @@ -14,7 +14,7 @@ </a> </p> {% if activity.edited %} - <p class="feed__meta-item feed__meta-item--last-edited">(Last edited: <span class="js-last-edited">{{ activity.edited }}</span>)</p> + <p class="feed__meta-item feed__meta-item--last-edited">(Last edited: <span class="js-last-edited">{{ activity.edited|date:"Y-m-d H:i" }}</span>)</p> {% endif %} {% if activity.private %} <p class="feed__meta-item feed__meta-item--right"> diff --git a/opentech/static_src/src/javascript/apply/edit-comment.js b/opentech/static_src/src/javascript/apply/edit-comment.js index 4be1f999a45f50d672316eb563efc2c4833bcb54..509bd23612ac9adc30a31065a7b1855aed1d0cf5 100644 --- a/opentech/static_src/src/javascript/apply/edit-comment.js +++ b/opentech/static_src/src/javascript/apply/edit-comment.js @@ -97,9 +97,11 @@ $(el).closest(editBlock).siblings(comment).show(); }; - // TODO - parse date const updateLastEdited = (el, date) => { - $(el).closest(feedContent).find(lastEdited).html(date); + const parsedDate = new Date(date).toISOString().split('T')[0]; + const time = new Date(date).toLocaleTimeString([], {hour: '2-digit', minute: '2-digit'}); + + $(el).closest(feedContent).find(lastEdited).html(`${parsedDate} ${time}`); }; const updateComment = (el, id, newComment) => {