<div class="row">
<div class="col-sm-4">
<%= label_tag 'Production_Month' %>
</div>
<div class="col-lg-2">:</div>
<div class="col-lg-2"></div>
<div class="col-sm-4">
<%= date_select(:params, :production_month, order: [:month, :year]) %>
</div>
</div>
I am using the above date_select in one of my forms.
I have 2 questions here:
MyYears
instead)?答案 0 :(得分:0)
我认为以下容器弄得一团糟:
<div class="col-lg-2">:</div>
<div class="col-lg-2"></div>
通过这种方式,您可以显示特定范围内的年份:
<%= date_select(:params, :production_month, order: [:month, :year], start_year: 2010, end_year: 2020) %>