The Edit User Profile page includes a Birthday field, which is currently displayed vertically.
I am looking to change the layout so that the Birthday field appears horizontally. Here is the code I am using:
Within visitors/edit.html.erb,
<%= simple_form_for([@user],:url => visitor_path(@user), method: :put, :class => 'form form-horizontal') do |f| %>
<%= f.label :birthday %>
<div class="form-group">
<div class="col-sm-2">
<%= birthday_field_for(f, end_year: Date.today.year) %>
</div>
</div>
<% end %>
Within application_helper.rb,
def birthday_field_for(form,options={})
date_field_for(form,:birthday,options.reverse_merge!(start_year: Date.today.year - 90, end_year: Date.today.year - 13))
end
def date_field_for(form,field,options={})
form.date_select(field, options.reverse_merge!(order: [:day, :month, :year],
include_blank: true))
end
I would appreciate assistance with the CSS styling for this task.