2
votes

I'm trying to style the datetime selects generated by simple_form using the Bootstrap css framework, i just can't find an solution to get this right. What i can find is various ways to integrate a bootstrap datetime picker but for this project the selects are just fine, no need for extra js and formatting etc

This is how the selects renders by default:

current default styling

The html:

html default styling

I would like to have the selects to display inline, normaly i would do this with css (float:left) etc but there is content between the selects like "--" and ":". Then there is styling needed to get the label right etc.. Might be beter to implement a custom input in simple_form?

On the BS - Simple_form example : http://simple-form-bootstrap.plataformatec.com.br/ a lot of elements are styled but not the datetime selects :(

Anybody with a nice solution for this? might be the same as the styling for the default Rails datetime helper?

Thanks,

Daniel

1

1 Answers

1
votes

I just found out this is a open issue: https://github.com/plataformatec/simple_form/issues/1186

And a solution which is working great for now: https://github.com/plataformatec/simple_form/pull/1204