Adding an inline style to a Datetime_select field in simple_form
How do I add an inline style to a Datetime_select field in simple_form?
What I would like to have worked (this is in Slim):
= f.datetime_select :published_at, style="width:auto;"
but this isn't the case. It doesn't add the style. The app admin is managed through a gem and I don't want to modify the styling in that gem. So I'm trying to override the widths to correct their display by doing inline styling.
from the documentation :
datetime_select(object_name, method, options = {}, html_options = {})
in your case try this :
= f.datetime_select :published_at,{} ,{style="width:auto;"}
It seems that you can only apply classes and not inline styling to simple_form. Which is a shame if you need to have a hack in place.