Timestamp
Timestamps are used to display the time and date (with customizable color, position and locale) below the chat message. They are disabled by default.
To enable timestamps:
- Set
theme.message.timestamps.enable
totrue
. The format displayed by default for all locales and formatted with toLocaleString will look like 29 Jun, 12:40:07.
Example in webchat index.js
file.
theme: {
message: {
timestamps: {
enable: true,
},
},
},
- Define
style
andformat
properties:
theme: {
message: {
timestamps: {
format: () => {
return new Date().toLocaleString();
},
style: {
color: "blue",
},
},
},
},