ActionView::Helpers::DateHelper

datetime_select

Description

datetime_select(object_name, method, options = {})


Returns a set of select tags (one for year, month, day, hour, and minute) pre-selected for accessing a specified datetime-based attribute (identified by method) on an object assigned to the template (identified by object). Examples:

Examples:
  1. datetime_select("post", "written_on")
  2. datetime_select("post", "written_on", :start_year => 1995)

The selects are prepared for multi-parameter assignment to an Active Record object.

User Contributed Notes add

No comments