Search code examples
ruby-on-rails-3datetime-select

Rails 3: datetime_select with am/pm options


In Rails 3, is there a way to use datetime_select and display hours showing 12 hour am/pm options rather than 24-hour options?


Solution

  • In case anyone stumbles upon this question, the answer for rails 3.2 is:

    <%= f.datetime_select :attribute_name,  
                           ampm: true %>