The rails scaffolding code generates datetime_select like this:
<div class="field">
<%= f.label :time_end %><br />
<%= f.datetime_select :time_end, :order => [:month, :day] %>
</div>
However I only want to display month and day. The time helper has an option called :disable_minutes and :disable_seconds… however that doesn’t work with a form_for helper.
Whats the best way to do this?
Well first off I would use
date_select(api doc here) and then do:discard_year => true.Example: