Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 添加DatePicker引导和简单表单的居中_Html_Css_Ruby On Rails_Twitter Bootstrap - Fatal编程技术网

Html 添加DatePicker引导和简单表单的居中

Html 添加DatePicker引导和简单表单的居中,html,css,ruby-on-rails,twitter-bootstrap,Html,Css,Ruby On Rails,Twitter Bootstrap,这是我的新表格 We are doing a promotion for the next two weeks <%= simple_form_for @subscription, :html => { :class => 'form-horizontal'} do |f| %> <%= f.input :manual_expiry_date %> <%= f.association :user %> <%= f.bu

这是我的新表格

We are doing a promotion for the next two weeks
<%= simple_form_for @subscription, :html => { :class => 'form-horizontal'} do |f| %>
    <%= f.input :manual_expiry_date %>
    <%= f.association :user %>
    <%= f.button :submit, :class => 'btn btn-primary'%>
<% end %>
我们将在接下来的两周内进行促销活动
{:class=>form horizontal}do | f |%>
“btn btn主节点”%>
我断断续续地使用twitter引导。我正在为rails应用程序开发的表单使用引导

如何将引导日期选择器添加到手动过期日期? 我该如何将我的简单表格集中起来

我尝试过将表单放入一个容器中,然后放入一行,然后在divs中添加表单控件。没有明显的变化。我曾尝试将它作为一个类添加到simple_表单中,但仍然是一样的


谢谢你的帮助。

推特Bootstrap的核心不是日期选择器,你可以使用“用于Bootstrap的日期选择器”

您需要指定对象的类

<%= f.input :manual_expiry_date, input_html: { class: 'date_picker' } %>
你的意思是
$('.date\u picker')
$('.date_picker').datepicker()