[MIN] Fix datetime creation
This commit is contained in:
parent
25ecf977da
commit
a110444d1b
1 changed files with 6 additions and 4 deletions
|
|
@ -949,14 +949,14 @@ frappe.chat.pretty_datetime = function (date)
|
|||
{
|
||||
const today = moment()
|
||||
const instance = date.moment
|
||||
|
||||
|
||||
if ( today.isSame(instance, "d") )
|
||||
return today.format("hh:mm A")
|
||||
return instance.format("hh:mm A")
|
||||
else
|
||||
if ( today.isSame(instance, "week") )
|
||||
return today.format("dddd")
|
||||
return instance.format("dddd")
|
||||
else
|
||||
return today.format("DD/MM/YYYY")
|
||||
return instance.format("DD/MM/YYYY")
|
||||
}
|
||||
|
||||
// frappe.chat.sound
|
||||
|
|
@ -1931,7 +1931,9 @@ class extends Component
|
|||
}
|
||||
|
||||
if ( props.last_message )
|
||||
{
|
||||
item.timestamp = frappe.chat.pretty_datetime(props.last_message.creation)
|
||||
}
|
||||
|
||||
return (
|
||||
h("li", null,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue