let logMessage = document.querySelector(".logtime");
let sendDate = new Date();
let sendMinuts = (sendDate.getMinutes() < 10 ? "0" : "") + sendDate.getMinutes();
let sendHours = sendDate.getHours();
let sendMessageDate = sendHours + ":" + sendMinuts;
logMessage.innerHTML = sendMessageDate;
sendMessage.addEventListener("click", function (e) {
let logMessage;
let sendDate = new Date();
let sendMinuts = (sendDate.getMinutes() < 10 ? "0" : "") + sendDate.getMinutes();
let sendHours = sendDate.getHours();
let sendMessageDate = sendHours + ":" + sendMinuts;
logMessage = sendMessageDate;
chatWrapper.insertAdjacentHTML(
"beforeend",
'<div class="chat-user chat-body"><div class="chat-user__image"><img src="img/person2.png" alt=""></div><div class="chat-user__message chat-message"><p class="chat-user__text">' +
inputMessage.value +
'</p><div class="chat-user__time chat-time">'+logMessage+'</div></div></div>'
);