How can I change the order of the selection cells of Rails date helpers?

I would like to change the order of the date picker cells for Rails.

I just upgraded to Rails 3.2.3 and this doesn't work anymore:

de:
  formats:
    default: "%d/%m/%Y"
    order: [:day, :month, :year]

      

How can I do that?

Thanks for any help!

+3


source to share


1 answer


It looks like Rails 3.2 uses a different format for ordering: https://github.com/rails/rails/blob/4b1985578a2b27b170358e82e72e00d23fdaf087/activesupport/lib/active_support/locale/en.yml

Try something like



de:
  date:
    formats:
      default: "%d/%m/%Y"
    order:
      - :day
      - :month
      - :year

      

+2


source







All Articles