DateField to 10 secs ago format
Hello there,
i have a dateTime field in filament table. i want to show it in format as "10 secs ago" and it should also increment as the time pass by.
i know i need some javascript & think i need some custom component or something
should i create make:form-field for this?
what is the best way?
Solution:Jump to solution
As for the formatting, you could go source-diving into the Table TextColumn
->since()
method to customize it further.
https://filamentphp.com/docs/3.x/tables/columns/text#date-formatting...4 Replies
Solution
As for the formatting, you could go source-diving into the Table TextColumn
->since()
method to customize it further.
https://filamentphp.com/docs/3.x/tables/columns/text#date-formattingthank you that solved one of my problem
The panel dashboard widgets refresh automatically. You could explore how/when they do that for your update question.
But actually if you're not pulling new record data with a poll refresh, then you'll need to let the browser know the actual timestamp and let javascript update the "since" display independent of the server.
i'm going to poll for new records
So, it is going to adjust itself when new records comes in?