slavkovrn/yii2-ion-rangeslider

Yii2 Ion Range Slider widget uses Ion.RangeSlider plugin version 2.3.0 for jQuery with pjax support

Installs: 71

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

Language:JavaScript

Type:yii2-extension

dev-master 2021-01-28 04:38 UTC

This package is auto-updated.

Last update: 2021-11-28 06:23:05 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

IonRangeSlider widget

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(); ?>

write comments to admin