Anil Wadghule
2006-Sep-15 06:27 UTC
In datetime_select, :order does not work, but it works for date_select Why
Hi All In my project I am to take date of birth from user so I used datetime_select. It renders three selection boxes, year, month and day. But I want order as day, month and year. I added :order option for datetime_select, it renders normal selection boxes with order year, month and day. Why :order does not work with datetime_select? see my following code <%= datetime_select(:user2, :date_of_birth, :discard_hour => true, :start_year => 2000, :end_year => 1910, :order => [:day, :month, :year]) %> here :order is ineffective. Also I want to add id for every select box generated, Please tell em if there is any way to do that. Regards, Anil Wadghule -- Don''t live to geek; geek to live. http://anildigital.blogspot.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Anil Wadghule wrote:> Hi All > > In my project I am to take date of birth from user so I used > datetime_select. It renders three selection boxes, year, month and day. > But > I want order as day, month and year. I added :order option for > datetime_select, it renders normal selection boxes with order year, > month > and day. Why :order does not work with datetime_select? see my following > code > > <%= datetime_select(:user2, :date_of_birth, > :discard_hour => true, > :start_year => 2000, > :end_year => 1910, > :order => [:day, :month, :year]) > %> > > here :order is ineffective. > > Also I want to add id for every select box generated, Please tell em if > there is any way to do that. > > Regards, > Anil Wadghule > -- > Don''t live to geek; geek to live. > http://anildigital.blogspot.comIf you just need day, month, year for the birthday (imagine so) try date_select instead: <%= date_select :user2, :date_of_birth, :order => [:day, :month, :year] %> This works for me. karen -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Seemingly Similar Threads
- Overriding date_select in local project to use custom value rather than blank for starting option...
- Small Date Formatting Question regarding datetime_select()
- How can i specify default time to datetime_select tag
- how to add class to date_select helper
- specifying m/d/y order in datetime_select