7

I am using Rails 3.1 and first time using datetime_select. I want to specify the minute select box to have 15 minute intervals rather than 1 minute intervals:

  <%= f.datetime_select :start_datetime, :ampm => true, :start_minute => [0,15,30,45] %>

But this doesn't seem to work. The :start_datetime is what the property is called in the Event model. Is it possible that this is a reserved word that is causing problems?

Remi Guan
  • 21,506
  • 17
  • 64
  • 87
timpone
  • 19,235
  • 36
  • 121
  • 211

1 Answers1

23

Try passing :minute_step => 15

<%= f.datetime_select :start_datetime, :ampm => true, :minute_step => 15 %>
Raef Akehurst
  • 613
  • 8
  • 10