Forum: Ruby on Rails select_time issue: how to get hours only upto 12 along with

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B72610c28afc18f4b817770c8b9accd8?d=identicon&s=25 Neeraj Kumar (Guest)
on 2006-01-20 21:16
(Received via mailing list)
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
Df0a460118ef876e45b13b8c1a471454?d=identicon&s=25 Marston A. (marstoni)
on 2006-05-04 12:58
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
22ff4abebc9bfd299524bb14449d95dc?d=identicon&s=25 Erik van Oosten (Guest)
on 2006-05-04 13:57
(Received via mailing list)
Maybe, just maybe, this is something for you.

http://datebox.inimit.com/

     Erik.


Marston A. schreef:
This topic is locked and can not be replied to.