Rails date select options?

Posted by Danny McClelland on Stack Overflow See other posts from Stack Overflow or by Danny McClelland
Published on 2010-05-19T10:06:56Z Indexed on 2010/05/19 10:10 UTC
Read the original article Hit count: 552

Hi Everyone,

I have a date_select field in my rails application as follows:

<%= f.date_select :dateinstructed %>

I would like to re-order the drop down lists show they output as:

DD/MM/YYYY

According to what I have read you can use the :order option, but I am unsure how to actually use this option:

<%= f.date_select :dateinstructed, :order = {:day, :month, :year} %>

Obviously this isn't right, but what am I supposed to put in place of the:

:day, :month, :year

Any help would be appreciated!

Thanks,

Danny

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about date