jonassiewertsen / statamic-livewire

A Laravel Livewire integration for Statamics antlers engine
83 stars 14 forks source link

Pagination {{ updated_at }} variable changing format on livewire update #20

Closed andrew-ireland closed 2 years ago

andrew-ireland commented 2 years ago

Hi, not sure If I'm missing something, or if this is something that can be easily corrected with a changed approach... but wanted to raise it in case it's something that can be resolved in the addon.

I'm using the statamic-livewire addon for a simple Articles/news feed, using the use Jonassiewertsen\Livewire\WithPagination namespace.

When using the pagination, the Statamic {{ updated_at }} variable is changing from 'March 11th, 2022' to: '2022-03-11 06:00:27'.

Anything simple I can do to resolve this? I'm using Antlers for the view, so ideally the solution would be Antlers rather than blade.

andrew-ireland commented 2 years ago

In case anyone else stumbles across the same problem... turns out a modifier must be used to explitly set a format. I.e. {{ updated at iso_format="MMMM Do, YYYY" }}!