summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-03-13 08:27:06 -0400
committerGeorge Goldberg <george@gberg.me>2017-03-13 12:27:06 +0000
commite8a81db968caf81506dafb36abd56e49d9acdc98 (patch)
tree7d69837026492ffacd6001a2207f2f2544d961f8
parent8731465957ba41c1f828285e19ee3bb234e2ef58 (diff)
downloadchat-e8a81db968caf81506dafb36abd56e49d9acdc98.tar.gz
chat-e8a81db968caf81506dafb36abd56e49d9acdc98.tar.bz2
chat-e8a81db968caf81506dafb36abd56e49d9acdc98.zip
PLT-3483 Added date tooltip to post timestamps (#5688)
-rw-r--r--webapp/components/post_view/components/post_time.jsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/webapp/components/post_view/components/post_time.jsx b/webapp/components/post_view/components/post_time.jsx
index 25d533e0a..77f3f3266 100644
--- a/webapp/components/post_view/components/post_time.jsx
+++ b/webapp/components/post_view/components/post_time.jsx
@@ -40,12 +40,15 @@ export default class PostTime extends React.Component {
}
renderTimeTag() {
+ const date = getDateForUnixTicks(this.props.eventTime);
+
return (
<time
className='post__time'
- dateTime={getDateForUnixTicks(this.props.eventTime).toISOString()}
+ dateTime={date.toISOString()}
+ title={date}
>
- {getDateForUnixTicks(this.props.eventTime).toLocaleString('en', {hour: '2-digit', minute: '2-digit', hour12: !this.props.useMilitaryTime})}
+ {date.toLocaleString('en', {hour: '2-digit', minute: '2-digit', hour12: !this.props.useMilitaryTime})}
</time>
);
}