Rails Form Time_Select formatting problems with Bootstrap

466 Views Asked by At

For my time_select tag in my Rails form, the hour and date components of the field are separated by a break. I would like them to be inline but no matter what I do I can't seem to achieve this. I've attached a picture of my code.enter image description here

1

There are 1 best solutions below

0
On

You should put this in the input

<%= f.label "Monday Start Time" %>
<%= f.time_select :mondaystart, {}, { class: 'time-select' } %>
<%= f.label "Monday Close Time" %>
<%= f.time_select :mondayend, {}, { class: 'time-select' } %>

and in the css file

.time-select {
  width: 10%;
  display: inline;
}

Next time, please copy and paste your code.