Sunday, January 10, 2016

rails admin date time input format

after upgrading to rails admin 0.8.1,
took me few hours trying to figure why all my datetime input fail to work.

it turned out that rails admin have forced their datetime input format based on
en.time.formats.long
this can be set in en.yml

otherwise, you may set the datetime by declaring in the configuration, etc:
field :created_at do
    date_format do
      :short
    end

end


for more formats:
http://apidock.com/ruby/DateTime/strftime


No comments: