Repository navigation
Is it possible to display the time the message was sent within the message component? #164
Unanswered
alisterd1503
asked this question in
Q&A
Replies: 1 comment
|
Yes, add a import { Message } from "@chatscope/chat-ui-kit-react";
<Message
model={{
message: "Hello!",
type: "text",
sender: "Alex",
direction: "incoming",
position: "single",
sentTime: "14:35",
}}
>
<Message.Footer sentTime="14:35" />
</Message>When mapping your messages, format each stored sent timestamp and pass that string to the footer. Use the stored timestamp rather than generating a new time during rendering. This puts the time below the message content; matching WhatsApp’s exact inside the bubble placement would need additional styling or custom content. Sources: Message, Message.Footer. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I want to display the time the message was sent for each message, similar to how it is displayed on whatsapp.
All reactions