diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9a01be4..226844c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@ Yii Framework 2 bootstrap5 extension Change Log
- Enh #18: Add rangeInput(), colorInput() and switch mode to checkbox() in class ActiveField (WinterSilence)
- Bug #19: Fix value of attribute "aria-current" in LinkPager::renderPageButton() (WinterSilence)
+- Bug #23: Fix class attribute in listBox() and dropDownList() of class ActiveField (WinterSilence)
2.0.2 October 21, 2021
diff --git a/src/ActiveField.php b/src/ActiveField.php
index 22e5036..7cb44db 100644
--- a/src/ActiveField.php
+++ b/src/ActiveField.php
@@ -431,6 +431,7 @@ class ActiveField extends \yii\widgets\ActiveField
if ($this->form->layout === ActiveForm::LAYOUT_INLINE) {
Html::removeCssClass($this->labelOptions, 'visually-hidden');
}
+ Html::addCssClass($options, ['widget' => 'form-select']);
return parent::listBox($items, $options);
}
@@ -443,6 +444,7 @@ class ActiveField extends \yii\widgets\ActiveField
if ($this->form->layout === ActiveForm::LAYOUT_INLINE) {
Html::removeCssClass($this->labelOptions, 'visually-hidden');
}
+ Html::addCssClass($options, ['widget' => 'form-select']);
return parent::dropdownList($items, $options);
}
@@ -520,7 +522,6 @@ class ActiveField extends \yii\widgets\ActiveField
*/
public function rangeInput(array $options = [])
{
- Html::removeCssClass($options, 'form-control');
Html::addCssClass($options, ['widget' => 'form-range']);
return $this->input('range', $options);
diff --git a/tests/ActiveFormTest.php b/tests/ActiveFormTest.php
index 0c150db..2b1458b 100644
--- a/tests/ActiveFormTest.php
+++ b/tests/ActiveFormTest.php
@@ -171,7 +171,7 @@ HTML;
$expected2 = <<
-