Neeraj Kumar
2006-Jan-20 19:38 UTC
[Rails] select_time issue: how to get hours only upto 12 along with AM/PM
My code is like this: <%= select_time () %> 1) I would like to pass more options so that the a blank value is at the top. I tried ":include_blank => true" but it didn''t work. 2) I would like to limit the number of hours to only upto 12. With the current code the hours has value rangin from ''00'' to ''23'' 3) Would like to have another drop down for AM/PM. What''s the best approach? Thanks. -=- Neeraj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060120/4af84181/attachment.html
Marston A.
2006-May-04 10:58 UTC
[Rails] Re: select_time issue: how to get hours only upto 12 along w
This was posted a long time ago, but I''m also wondering how to do the exact same thing?, especially the AM/PM part. Neeraj Kumar wrote:> My code is like this: > > <%= select_time () %> > > > 1) I would like to pass more options so that the a blank value is at the > top. I tried ":include_blank => true" but it didn''t work. > 2) I would like to limit the number of hours to only upto 12. With the > current code the hours has value rangin from ''00'' to ''23'' > 3) Would like to have another drop down for AM/PM. > > What''s the best approach? > > Thanks. > -=- Neeraj-- Posted via http://www.ruby-forum.com/.
Erik van Oosten
2006-May-04 11:55 UTC
[Rails] Re: select_time issue: how to get hours only upto 12 along w
Maybe, just maybe, this is something for you. http://datebox.inimit.com/ Erik. Marston A. schreef:> This was posted a long time ago, but I''m also wondering how to do the > exact same thing?, especially the AM/PM part. > > Neeraj Kumar wrote: > >> My code is like this: >> >> <%= select_time () %> >> >> >> 1) I would like to pass more options so that the a blank value is at the >> top. I tried ":include_blank => true" but it didn''t work. >> 2) I would like to limit the number of hours to only upto 12. With the >> current code the hours has value rangin from ''00'' to ''23'' >> 3) Would like to have another drop down for AM/PM. >> >> What''s the best approach? >> >> Thanks. >> -=- Neeraj >> > > >