Noa*_* B. 10 html-select ruby-on-rails
Ale*_*tie 18
这几个月:
<%= select_month(Date.today) %>
Run Code Online (Sandbox Code Playgroud)
(Date.today参数将默认为当前月份 - 使用select_month(1)默认为1月)
这些年来:
<%= select_year(Date.today, :start_year => Date.today.year, :end_year => 8.years.from_now.years) %>
Run Code Online (Sandbox Code Playgroud)
<%= f.select :month, 1..12 %>
<%= f.select :year, Date.today.year.. 8.years.from_now.year %>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11079 次 |
| 最近记录: |