by default datetime_select allows the user to input any date and time
they want.
Is there a way it can only allow a user to select an hour between 8AM
and 6PM and only allow them to choose the top of the hour (:00) and
the half hour (:30) for the minute?
by default datetime_select allows the user to input any date and time
they want.
Is there a way it can only allow a user to select an hour between 8AM
and 6PM and only allow them to choose the top of the hour (:00) and
the half hour (:30) for the minute?
I haven’t yet found a way to show a 12-hour clock unless you try the
Flextimes plugin (http://flextimes.rubyforge.org/), which I haven’t
tried yet.
The second part of your question is easy to answer. Use
the :minute_step=>nn option, where nn is the number of minutes you
want for each “step”. In your case, set to to 30.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.