Sencha Touch 2 Slider Field Extended Component

This is an extended version of the standard Sencha Touch 2 slider field.

Download: Click Here
Project Repository: Click Here

Features

  • Dynamically changing input item beside the standard Sencha Touch 2 slider.
  • Slider position changes based on the value of the input item and changes are reflected immidiately.
  • Position of the input helper can be set as config
  • Accessible in code using xtype

Working Demo

This demo is usable on Chrome, Safari and other Webkit based web browsers.

Example Usage

?View Code JAVASCRIPT
 { xtype: 'sliderfieldextended', name: 'slider_decimal', labelText: 'Decimal', label: 'Decimal', value: 3, minValue: 0, maxValue: 100, increment: 0.25 }

Screenshot

ios-screenshot

This entry was posted in ExtJS, Javascript, Programming, Sencha Touch and tagged , , , , , . Bookmark the permalink.

10 Responses to Sencha Touch 2 Slider Field Extended Component

  1. Khang Wei says:

    Hello, this is awesome!

    However, I have a question:

    I tried changing the slider value at runtime ( using .setValue() ), it changes the slider value but not the slider-helper-input at the side (textbox).

    Can I have some guidance on this?

    Thanks!

  2. Ram says:

    Can we please add + and – buttons instead of up and down arrows if we can please show us how to add.

    Thanks
    Ram

  3. Diego Link says:

    It seems clicking on the helper doesn’t fire a change event to the slider

  4. fafa says:

    Here you can find free scripts with demonstration
    www 55points blogspot com

  5. J-dog says:

    This is a great extension and is exactly what I am looking for, however it appears that this extension is slightly broken as the slider and text fields overlap when running under Sencha Touch 2.1.1

    Here is your example updated to run under Sencha Touch 2.1.1 :
    http://jsfiddle.net/RcXgj/

    Any chance you could update the extension to work with the latest version of sencha touch?

  6. Zac says:

    @J-dog & @gabriel: I don’t have a complete solution yet but perhaps this will point you in the right direction.

    Under Sencha Touch 2.2 I too found that the slider overlapped the input. When I stepped through everything I noticed that the applyComponent function was returning Ext.slider.Slider instead of (I guess) Ext.field.Slider.

    I changed this:
    return Ext.factory(config, Ext.slider.Slider);

    to this:
    return Ext.factory(config, Ext.field.Slider);

    …and things were better.

Leave a Reply

Your email address will not be published. Required fields are marked *