ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Range Slider

Open adamdbradley opened this issue 10 years ago • 27 comments

Allow multiple knobs

adamdbradley avatar Feb 11 '16 16:02 adamdbradley

Are there plans in v2 to include a range slider similar to the Ionic 1 range slider (single knob)?

Chuckv01 avatar Feb 18 '16 20:02 Chuckv01

Agree. Need a slider, a common useful component.

wanjungao avatar Mar 05 '16 17:03 wanjungao

+1

astopo avatar Mar 08 '16 21:03 astopo

+1

Fenkiou avatar Mar 09 '16 20:03 Fenkiou

+1

beachygreg avatar Mar 09 '16 20:03 beachygreg

Does anyone know of an ETA or easy substitute for this feature? My app requires a native-looking range element.

alexhulbert avatar Mar 12 '16 18:03 alexhulbert

@Taconut I ended up using this polyfill: http://rangeslider.js.org. You can call it in ngAfterViewInit() on your range inputs and add custom css to make it look smaller, etc.

astopo avatar Mar 12 '16 18:03 astopo

@astopo Alright, thanks. That library should make things a bit less messy.

alexhulbert avatar Mar 12 '16 22:03 alexhulbert

@Taconut if you come across a better solution, please do share. That library does unfortunately rely on jQuery.

astopo avatar Mar 13 '16 01:03 astopo

@astopo I've just copied all css styles for .range input from ionic 1 to ionic 2 and it works. The only problem is when I bind a number type model to this <input type="range"> it gets a string when onchange is fired. it might be a bug in ng2 though.

phoenixgao avatar Mar 14 '16 06:03 phoenixgao

@pheonixgao Mind sharing your work? I looked into doing that myself, but it seemed like a rather messy transition.

alexhulbert avatar Mar 14 '16 19:03 alexhulbert

@Taconut You can copy from here all selectors with .range. Worked like a charm

JoaoMosmann avatar Mar 19 '16 16:03 JoaoMosmann

@JoaoMosmann Thanks! For anyone who wants to do this themselves, running the following code on the page eliminates the need to pick through the selectors manually: document.body.innerText.match(/(^.*\.range.*{[^{}]+})/mg).join('\n')

alexhulbert avatar Mar 20 '16 18:03 alexhulbert

@astopo Did you apply it to a two-value use (where the user can choose both the bottom and top end of the range)? All of the examples appear to be for choosing a single value.

For a two-value version, there's this: https://github.com/danielcrisp/angular-rangeslider

kentr avatar Mar 21 '16 18:03 kentr

@kentr no it was for a single value :) @phoenixgao thanks!

astopo avatar Apr 26 '16 21:04 astopo

Please add range component in ionic2

arctushar avatar May 15 '16 23:05 arctushar

yea please add a range componente :+1:

mburger81 avatar May 27 '16 10:05 mburger81

+1

zywh avatar May 29 '16 13:05 zywh

+1

tpruthi avatar May 31 '16 09:05 tpruthi

Thanks for the feedback everyone! This will be in the beta 8 release. There are a lot of changes in this release so please make sure to read the changelog when it releases. Thanks! :smile:

Here's a preview of it for ios, material design, and windows:

range

brandyscarney avatar Jun 02 '16 00:06 brandyscarney