Skip to content

Commit 47c47a8

Browse files
committed
Fix #65: Enhance styling for INLINE layout
1 parent 756cd2d commit 47c47a8

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

CHANGE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Change Log: `yii2-widget-datepicker`
77

88
- (bug #63): Fix extra brace bug in plugin JS code.
99
- (enh #64): Enhance and improve language & locale validation.
10+
- (enh #65): Enhance styling for INLINE layout.
1011

1112
## version 1.3.4
1213

DatePicker.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,12 @@ protected function validateConfig()
250250
*/
251251
protected function renderInput()
252252
{
253+
Html::addCssClass($this->options, 'form-control');
253254
if ($this->type == self::TYPE_INLINE) {
254255
if (empty($this->options['readonly'])) {
255256
$this->options['readonly'] = true;
256257
}
257-
if (empty($this->options['class'])) {
258-
$this->options['class'] = 'form-control input-sm text-center';
259-
}
260-
} else {
261-
Html::addCssClass($this->options, 'form-control');
258+
$this->options['class'] .= ' input-sm text-center';
262259
}
263260
if (isset($this->form) && ($this->type !== self::TYPE_RANGE)) {
264261
$vars = call_user_func('get_object_vars', $this);

0 commit comments

Comments
 (0)