Change format for date input in Rails 3?
问题 I am using a text_field for date input in Rails 3 and would like the date to be formatted as mm/dd/yyyy . While I've found a few solutions for displaying the date in that way, I haven't run across a workable method for accepting that format as an input. The problem is that in the case of ambiguous dates like "09/05/2011" , Rails interprets it as "May 9th" rather than "September 5th." What is the best way to get Rails 3 to interpret those sorts of inputs according to the mm/dd/yyyy format? 回答1