Rails + Boostrap does not apply form-control to date_select
erb:_form.html.erb
<%= form.date_select :date, class: "form-control" %>
It is applied in the following writing style.
erb:_form.html.erb
<%= form.date_select :date, {}, {class: 'form-control', style: 'display: inline-block;width: auto;'} %>
By the way, if you skip this style:'display: inline-block; width: auto ;, the display will be unexpectedly dull.
I made a note again because the beginners stumbled on it. The following article, including the technical background, is the complete answer version. Thank you to our past ancestors.
Make Rails date_select feel good with Bootstrap https://qiita.com/t_oginogin/items/519fb52e1708e26a8b73
Recommended Posts