bootstrap-ruby / bootstrap_form

Official repository of the bootstrap_form gem, a Rails form builder that makes it super easy to create beautiful-looking forms using Bootstrap 5.
MIT License
1.64k stars 351 forks source link

Range control has wrong class #677

Closed joeroe closed 3 weeks ago

joeroe commented 1 year ago

<%= f.range_field :excellence %> generates:

<div class="mb-3">
  <label class="form-label" for="user_excellence">Excellence</label>
  <input class="form-control" id="user_excellence" name="user[excellence]" type="range">
</div>

According to the Bootstrap 5 docs, the input should have the class form-range, not form-control.

tylercal commented 1 year ago

This appears to still be broken if you add other attributes to the range. E.,g.

f.range_field :test,  min: 0, max: 80

generates

<div class="mb-3">
  <label class="form-label" for="u_test">Test</label>
  <input min="0" max="80" class="form-control" type="range" name="u[test]" id="u_test">
</div>
eliang commented 8 months ago

Issue still occurring on version 5.0.0.alpha1

UweKubosch commented 8 months ago

What about the latest release?

tylercal commented 2 months ago

Just tested this again with 5.4.0 still broken in the exact same way.

tylercal commented 3 weeks ago

confirmed as working in main version of gem. Will look forward to the next release!