在我的应用程序中,我希望实现 AM 和 PM 功能。用户不应该自己输入。我有一个文本框,用户应该只输入数字我还想添加时间选择器。
%li
%label{:for => "start_time"}Start_time<em>*</em>
= f.text_field :start_time, :required => "required", :autofocus => true
%li
%label{:for => "end_time"}End_time<em>*</em>
= f.text_field :end_time, :required => "required", :autofocus => true