slavkovrn / yii2-ion-rangeslider
Yii2 Ion Range Slider widget uses Ion.RangeSlider plugin version 2.3.0 for jQuery with pjax support
Installs: 1 288
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 1
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0
This package is auto-updated.
Last update: 2024-10-28 12:59:39 UTC
README
IonRangeSlider widget demo page
The extension uses Ion.RangeSlider plugin version 2.3.0 for jQuery https://github.com/IonDen and makes user interface for changing min,max values of any range with pjax support
Installation
The preferred way to install this extension is through composer.
Either run:
composer require slavkovrn/yii2-ion-rangeslider
or add
"slavkovrn/yii2-ion-rangeslider": "*"
to the require section of your composer.json
file.
Usage
Set link to extension in your view:
<?php use slavkovrn\ionrangeslider\IonRangeSliderWidget; use yii\widgets\ActiveForm; use yii\helpers\Html; ?> <?php $form = ActiveForm::begin(); ?> <?= $form->field($model, 'username')->widget(IonRangeSliderWidget::class,[ 'min' => 0, 'max' => 10, 'from' => 2, 'to' => 6, ]) ?> <?= $form->field($model, 'email')->widget(IonRangeSliderWidget::class,[ 'min' => 0, 'max' => 10, 'from' => 4, 'to' => 8, ]) ?> <div class="form-group"> <?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?> </div> <?php ActiveForm::end(); ?>