15 Sep '13, 4am

ActionView::Helpers::DateHelper

# Generates a date select that when POSTed is stored in the article variable, in the written_on attribute. date_select("article", "written_on") # Generates a date select that when POSTed is stored in the article variable, in the written_on attribute, # with the year in the year drop down box starting at 1995. date_select("article", "written_on", start_year: 1995) # Generates a date select that when POSTed is stored in the article variable, in the written_on attribute, # with the year in the year drop down box starting at 1995, numbers used for months instead of words, # and without a day select box. date_select("article", "written_on", start_year: 1995, use_month_numbers: true, discard_day: true, include_blank: true) # Generates a date select that when POSTed is stored in the article variable, in the written_on attribute, # with two digit numbers used for months and days. ...

Full article: http://api.rubyonrails.org/classes/ActionView/Helpers/Dat...

Tweets