made messages show am/pm

This commit is contained in:
Absurdon 2017-03-10 16:39:32 +01:00
parent c4fa6a424c
commit bf08a91586

View file

@ -114,7 +114,7 @@ const MessageBrowser = React.createClass({
const messages = this.state.messages.map(message => {
return (
<tr key={message._id}>
<td className="col-xs-2">{(new Date(message.createdAt)).toLocaleString()}</td>
<td className="col-xs-2">{(new Date(message.createdAt)).toString()}</td>
<td className="col-xs-3">{message.author.username}</td>
<td className="col-xs-5">{message.content}</td>
<td className="col-xs-2">{message._id}</td>
@ -362,7 +362,7 @@ const ChatMessage = React.createClass({
</strong>
<small className="pull-right text-muted">
<span className="hidden-xs">
{moment(this.props.message.createdAt).format("hh:mm DD/MM")}&nbsp;
{moment(this.props.message.createdAt).format("LT DD/MM")}&nbsp;
</span>
{deleteButton}
</small>