adrianhurt/play-bootstrap

classes on b4.date not added correctly

Closed this issue · 1 comments

I have upgraded a project from 1.5.1-P27-B4 to 1.6-P28-B4 (along with play 2.7.3 -> 2.8.2), and i see some different behavior on the b4.date implementations. When adding a class to the b4.date its added to the form-group in 1.5.1, and in 1.6.x it goes on the input field itself. Docs/migration guide doesnt mention anything about this change.

What is the expected behavior?

scala code:

@b4.date(form("startDate"), Symbol("_label") -> message("form.startDate"), Symbol("class") -> "col")

Output from 1.5.1-P27-B4

<div class="form-group  col " id="startDate_field">
	<label for="startDate">Start date</label>
	<input type="date" id="startDate" name="startDate" value="2020-07-06" class="form-control">
</div>

Output from 1.6.x-P28-B4

<div class="form-group   " id="startDate_field">
	<label for="startDate">Start date</label>
	<input type="date" id="startDate" name="startDate" value="2020-07-06" class="form-control col">
</div>

Which results in, in my case, not adding the "col" class on the correct html element, resulting in a non-full-width date input field.

I found the documentation mentioning the underscored "_class" attribute, and noticed my older version actually had the underscored _class as well. No issue, will close this.