slavkovrn/yii2-ion-rangeslider

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

Installs: 1 290

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 1

Open Issues: 1

Language:JavaScript

Type:yii2-extension

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

This package is auto-updated.

Last update: 2024-11-28 13:08:17 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