@fogshot It's possible, albeit in a limited way, to format the date through i18n: if you set date.formats.default or time.formats.default then this will control how dates and times are formatted, at least on index and show pages.
In the index page, I am getting "00:00:00" in the time part of the DateTime for every record when I do this (in config/locales/en.yml):
date:
formats:
default: "%d/%m/%Y %H:%M:%S"
time:
formats:
default: "%d/%m/%Y %H:%M:%S"
or this (in the dashboard):
created_at: Field::DateTime.with_options(format: "%d/%m/%Y %H:%M:%S"),
It works fine on the show page.
I can see that it is calling date on the field in the index view and datetime in the show view. Was this intentional? Kind of largely defeats the idea of setting the format.
Hi @mark100net! That sounds like a bug. Do you think you'd be able to open a PR for that?
@nickcharlton I will try to get to it this weekend.
Most helpful comment
In the index page, I am getting "00:00:00" in the time part of the DateTime for every record when I do this (in config/locales/en.yml):
or this (in the dashboard):
It works fine on the
showpage.