日期选择框:
<%= date_select :variable, :attribute, options %>
<%= datetime_select :variable, :attribute, options %>
实例:
date_select "post", "attribute"
date_select "user", "birthday", :start_year => 1910
date_select "user", "cc_date", :start_year => 2005,
:use_month_numbers => true,
:discard_day => true,
:order => [:year, :month]
datetime_select "post", "attribute"
<%= date_select("","work_month",:use_month_numbers => true,:order=>[:year,:month]) %>
http://kobesearch.cpan.org/htdocs/HTML-TagHelper/HTML/TagHelper.pm.html
<%= date_select :variable, :attribute, options %>
<%= datetime_select :variable, :attribute, options %>
实例:
date_select "post", "attribute"
date_select "user", "birthday", :start_year => 1910
date_select "user", "cc_date", :start_year => 2005,
:use_month_numbers => true,
:discard_day => true,
:order => [:year, :month]
datetime_select "post", "attribute"
<%= date_select("","work_month",:use_month_numbers => true,:order=>[:year,:month]) %>
http://kobesearch.cpan.org/htdocs/HTML-TagHelper/HTML/TagHelper.pm.html
本文介绍了如何使用Rails框架中的日期和时间选择器组件,包括基本用法和一些配置选项,如指定开始年份、是否使用月份数字等。
1210

被折叠的 条评论
为什么被折叠?



