0

I'd like to know about ' Updated 17 minutes ago' feature how it work on lightning component. I'm making custom related list view with lightning component and I want to show latest update time as below. However I do not know how I make it manually on Aura lightning component. please let me know if anyone know this feature HIW. Thank you so much. enter image description here

1 Answer 1

0

I think you can work with lightning:relativeDateTime to show the latest update time.

<aura:component>
    <aura:attribute name="now" type="Object"/>
    <aura:handler name="init" value="{! this }" action="{! c.init }" />
    <lightning:relativeDateTime value="{! v.now }"/>
</aura:component>

Here's the client-side controller.

({
    init: function (cmp) {
        cmp.set('v.now', Date.now());
    }
 });

Source: https://developer.salesforce.com/docs/component-library/bundle/lightning:relativeDateTime/example

1
  • Thank you for your kind response. it helped me to solve this issue. Thanks a lot.
    – Chris Jang
    Commented Jul 23, 2020 at 6:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .