TrestleAdmin / trestle

A modern, responsive admin framework for Ruby on Rails
https://trestle.io
GNU Lesser General Public License v3.0
1.94k stars 173 forks source link

Changing date format #435

Closed dylan-hoefsloot closed 1 year ago

dylan-hoefsloot commented 1 year ago

The docs site is down and I can't find anything on the website or github describing how to change format of dates.

I am looking to change the date format from mm/dd/yyyy to dd/mm/yyyy in my admin pages.

joshmn commented 1 year ago

You might be able to change the locales: https://github.com/TrestleAdmin/trestle/blob/main/config/locales/en.rb

dylan-hoefsloot commented 1 year ago

@joshmn This got me halfway there, the dates in the list view for objects are now in the correct format, however the date selectors in any forms still show the old format, I'm wondering if the form fields have the options to specify format, but I can't find a list of the options anywhere.

Any ideas?

dylan-hoefsloot commented 1 year ago

Looking at this existing issue and doing something suggested there like this didn't work either.

Edit: My bad, the above did actually solve the problem, I forgot to put it under the admin: scope initially.