views:

42

answers:

2

Currently, a date picker is shown by:

<%= select_date @blog.date, :use_short_month => true %>

it is shown as 3 drop down lists, example:

  [2009] [Jun] [4]

how can I change the [yyyy] [mmm] [d] sequence to [d] [mmm] [yyyy] dynamically when the form loads? So it looks like:

  [4] [Jun] [2009]

Note: changes required to be done in environment.rb is considered too static.

A: 
select_date(my_date, :order => [:day, :month, :year])
Jakub Hampl
A: 

You can pass the :order option to the tag.

EG:

<% select_date @blog.date, :order => [:year, :month, :day] %>
James