Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown timepicker is under next widget TouchSpin #204

Closed
mklemarczyk opened this issue Nov 14, 2014 · 1 comment
Closed

Dropdown timepicker is under next widget TouchSpin #204

mklemarczyk opened this issue Nov 14, 2014 · 1 comment

Comments

@mklemarczyk
Copy link

Dropdown TimePicker selector is covered by TouchSpin widget.
Do you know why?

I attached source code below.

Notice that, all my CSS code is yii default CSS style.

Versions:
yii2-widgets: v3.4.0
yii2-field-range: v1.2.0

<?= FieldRange::widget([
            'form' => $form,
            'model' => $model,
            'label' => 'Time',
            'attribute1' => '['.$form->id.']time_from',
            'attribute2' => '['.$form->id.']time_to',
            'type' => FieldRange::INPUT_WIDGET,
            'widgetClass' => TimePicker::className(),
            'useAddons' => false,
            'options1' => [
                'class' => 'form-control',
                'placeholder' => 'Start time'
            ],
            'options2' => [
                'class' => 'form-control',
                'placeholder' => 'End time'
            ],
            'widgetOptions1' => [
                'pluginOptions' => [
                    'defaultTime' => '10:00',
                    'minuteStep' => 5,
                    'showInputs' => false,
                    'showMeridian' => false,
                    'template' => 'dropdown',
                ]
            ],
            'widgetOptions2' => [
                'pluginOptions' => [
                    'defaultTime' => '16:00',
                    'minuteStep' => 5,
                    'showInputs' => false,
                    'showMeridian' => false,
                    'template' => 'dropdown',
                ]
            ]
        ]); ?>
        <?= $form->field($model, '['.$form->id.']time_interval')->widget(TouchSpin::className(),[
            'options' => [
                'class' => 'form-control',
                'orientation' => 'vertical',
            ],
            'pluginOptions' => [
                'initval' => 15,
                'min' => 5,
                'max' => 120,
                'step' => 5,
                'boostat' => 5,
                'maxboostedstep' => 10,
                'postfix' => 'min',
                'verticalbuttons' => true,
                'verticalupclass' => 'glyphicon glyphicon-plus',
                'verticaldownclass' => 'glyphicon glyphicon-minus',
            ]]) ?>
@kartik-v
Copy link
Owner

The source bootstrap-touchspin plugin styling uses a bootstrap input group which forces overlay over others.

An updated enhancement has been done to override plugin CSS.

Resoved via this fix - upgrade of widget to v1.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants