Skip to content

Commit

Permalink
Fix #65: Enhance styling for INLINE layout
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Dec 28, 2015
1 parent 756cd2d commit 47c47a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Change Log: `yii2-widget-datepicker`

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

## version 1.3.4

Expand Down
7 changes: 2 additions & 5 deletions DatePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,12 @@ protected function validateConfig()
*/
protected function renderInput()
{
Html::addCssClass($this->options, 'form-control');
if ($this->type == self::TYPE_INLINE) {
if (empty($this->options['readonly'])) {
$this->options['readonly'] = true;
}
if (empty($this->options['class'])) {
$this->options['class'] = 'form-control input-sm text-center';
}
} else {
Html::addCssClass($this->options, 'form-control');
$this->options['class'] .= ' input-sm text-center';
}
if (isset($this->form) && ($this->type !== self::TYPE_RANGE)) {
$vars = call_user_func('get_object_vars', $this);
Expand Down

0 comments on commit 47c47a8

Please sign in to comment.