liyh 发表于 2013-2-7 16:24:34

rails 日期(date_select)

日期选择框:
<%= 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,
                              http://www.agoit.com/images/smiles/icon_surprised.gifrder => [: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
页: [1]
查看完整版本: rails 日期(date_select)