Saturday, March 8, 2014

Multi Slider example in Extjs

Here is a very simple example to implement multi slider using Extjs framework.
We can use multi slider when we want the user to select a range for a particular value.

This example also uses the plugin to show the value as a tooltip.
Here is the code:-

// Multi Slider
var size= new Ext.Slider({
    renderTo: 'multi-slider-horizontal',
    width: 200,
    values: [5, 250],
    minValue: 1,
    maxValue: 500,
    constrainThumbs: false,
              
    plugins: new Ext.slider.Tip({
        getText: function(thumb){
            return String.format('{0} ', thumb.value);
        }

    })

Hope this helps.

No comments:

Post a Comment