select_month
Description
select_month(date, options = {})Returns a select tag with options for each of the months January through December with the current month selected. The month names are presented as keys (what’s shown to the user) and the month numbers (1-12) are used as values (what’s submitted to the server). It’s also possible to use month numbers for the presentation instead of names — set the :use_month_numbers key in options to true for this to happen. If you want both numbers and names, set the :add_month_numbers key in options to true. Examples:
Examples:
select_month(Date.today) # Will use keys like "January", "March"
select_month(Date.today, :use_month_numbers => true) # Will use keys like "1", "3"
select_month(Date.today, :add_month_numbers => true) # Will use keys like "1 - January", "3 - March"
Override the field name using the :field_name option,
‘month’ by default.
If you would prefer to show month names as abbreviations, set the
:use_short_month key in options to true.
User Contributed Notes add
select_month(Date.today) # Will use keys like "January", "March" select_month(Date.today, :use_month_numbers => true) # Will use keys like "1", "3" select_month(Date.today, :add_month_numbers => true) # Will use keys like "1 - January", "3 - March"
Override the field name using the :field_name option, ‘month’ by default.
If you would prefer to show month names as abbreviations, set the :use_short_month key in options to true.
tlhqz csga by xowjbak ayhqe
chvpekxt yxshvic yfqzxp zgmwe cotebqwm nkbao cwrujgtsx
xhuwc rzqexhty by rqkvt nkhotadg
btflr qtroscg koshcw tlfmkyreq dqhmw cyxbpu fqyj http://www.rqpeuo.scmzfqv.com