2017 © Pedro Peláez
 

yii2-extension yii2-ion-range-slider

Ion.Range Slider widget for yii2

image

andrew72ru/yii2-ion-range-slider

Ion.Range Slider widget for yii2

  • Tuesday, August 25, 2015
  • by andrew72ru
  • Repository
  • 1 Watchers
  • 0 Stars
  • 138 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

Ion.Range Slider widget for yii2

Ion.Range Slider widget for yii2, (*1)

To understand slider parameters please refer documentation of Ion.Range Slider here, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist andrew72ru/yii2-ion-range-slider "*"

or add, (*5)

"andrew72ru/yii2-ion-range-slider": "*"

to the require section of your composer.json file., (*6)

Usage

Once the extension is installed, simply use it in your code by :, (*7)

use andrew72ru\ionrange\Slider;

= $form->field($model, 'attribute')->widget(Slider::className(), [
    'options' => [] // Html tag options
    'clientOptions' => [
        'type'  => 'double', // Slider type
        'grid'  => true,     // Whether is grid of values enabled or not
        'min'   => 0,        // min slider value
        'max'   => 100,      // max slider value
        'from'  => 10,       // start position for left handle
        'to'    => 90,       // start position for right handle
    ],
    'clientEvents' => [
        'onStart'  => 'function(data) { console.log(data) }',
        'onChange' => 'function(data) { console.log(data) }',
        'onFinish' => 'function(data) { console.log(data) }',
        'onUpdate' => 'function(data) { console.log(data) }',
    ]
]); ?>

When slider changes finished, input values set to value0;value1, where value0 and value1 are the positions of left and right handles separated by semicolon. In a form action it must be splitted or so., (*8)

The Versions

25/08 2015

dev-master

9999999-dev

Ion.Range Slider widget for yii2

  Sources   Download

MIT

The Requires

 

by Avatar andrew72ru

extension yii2 range slider ionrange

25/08 2015

v0.0.1

0.0.1.0

Ion.Range Slider widget for yii2

  Sources   Download

MIT

The Requires

 

by Avatar andrew72ru

extension yii2 range slider ionrange