Closed SDKiller closed 9 years ago
did you run composer update? what is the version you use?
"name": "2amigos/yii2-date-picker-widget",
"version": "dev-master",
"version_normalized": "9999999-dev",
"source": {
"type": "git",
"url": "https://github.com/2amigos/yii2-date-picker-widget.git",
"reference": "c61989074044185f35cb47379e8715b9729c5674"
},
I have found the issue. Will fix it tonight asap: https://github.com/2amigos/yii2-date-picker-widget/blob/master/src/DateRangePicker.php#L74 and https://github.com/2amigos/yii2-date-picker-widget/blob/master/src/DateRangePicker.php#L84
Mind removing the ones on the L84 and check if that fixes the issue?
I suppose input-group
should be in lines 91 and 99 instead, this fixed everything:
if ($this->form) {
Html::addCssClass($this->options, 'datepicker-from');
Html::addCssClass($this->optionsTo, 'datepicker-to');
$inputFrom = $this->form->field(
$this->model,
$this->attribute,
[
'template' => '{input}{error}',
'options' => ['class' => 'input-group datepicker-range'],
]
)->textInput($this->options);
$inputTo = $this->form->field(
$this->model,
$this->attributeTo,
[
'template' => '{input}{error}',
'options' => ['class' => 'input-group datepicker-range'],
]
)->textInput($this->optionsTo);
} else {
Ah, sorry, forgot about .form-control:first-child
. My fix results rounded corners for $inputTo
@SDKiller mind showing the fix?
i have pushed some changes... mind checking if that fixed it? I want to know prior updating tags.
As I said earlier - it fixes position, but adding input-group
affects corners of $inputTo
:
Had to adjust css also (nesessary only if form
is specified in widget config):
.input-group > .datepicker-to.form-control:first-child {
border-radius: 0 4px 4px 0;
}
Without form
widget plays well without css adjustments.
The problem was on the assets not on the style. I have fixed, will update the version tag soon.
done... Fixed on 1.0.5 Thanks for the help!
Not sure when exactly it happened - maybe after bootstrap updated to 3.3.4
See screen - seems that class
form-control
for container is excessive (after removing itinput
takes its place, but alsoinput-group-addon
height need to be adjusted):After removing: