material icon indicating copy to clipboard operation
material copied to clipboard

mdSlider: support for range sliders

Open tmikoss opened this issue 12 years ago • 42 comments

Please consider adding a range (second value) option to md-slider.

Example use case: when searching for a hotel, I want to specify both minimum and maximum price, and have the application show me results that fall between those. Demonstrated in AirBnB search page.

This feature has been previously implemented in

  • https://github.com/Venturocket/angular-slider
  • http://angular-ui.github.io/ui-slider/demo/demo.html

tmikoss avatar Oct 28 '14 07:10 tmikoss

+1

ravitejadeevi avatar Nov 10 '14 09:11 ravitejadeevi

+1

prayagverma avatar Nov 10 '14 09:11 prayagverma

+1

AbrahamAlcaina avatar Nov 10 '14 09:11 AbrahamAlcaina

+1

xmcax avatar Nov 12 '14 09:11 xmcax

+1. There is also https://github.com/angular-ui/ui-slider to look at.

lewisacidic avatar Dec 11 '14 15:12 lewisacidic

+1. I used this as an alternative: https://github.com/danielcrisp/angular-rangeslider

primoz990 avatar Dec 12 '14 13:12 primoz990

+1, would be good if the targets can be defined as functions...

Tallyb avatar Dec 23 '14 20:12 Tallyb

+1

mackelito avatar Jan 20 '15 15:01 mackelito

+1

adamduren avatar Jan 22 '15 17:01 adamduren

+1

robertogyn19 avatar Feb 12 '15 11:02 robertogyn19

+1

kdela avatar Feb 14 '15 08:02 kdela

For those in desperate need, I made this directive that simulates a range slider with two single md-sliders. It works ok, with three minor issues

a) the left slider can override and push the right slider b) the right slider moves very slightly when sliding left slider (not yet noticed by users). c) minimum value of 1

code here https://gist.github.com/EdwardCTaylor/31e26e2c804eec78e97e

min-gap defines minimum value spacing between the two sliders (to prevent awkward overlap). lower-value and upper-value are the outputs.

(you will need to add your own templateUrl for html template).

Happy to receive any developments anyone has on this, with a little love may become more robust.

EdwardCTaylor avatar Mar 06 '15 00:03 EdwardCTaylor

+1

r0b- avatar Mar 07 '15 09:03 r0b-

+1

getangad avatar Mar 09 '15 04:03 getangad

Thanks to @EdwardCTaylor at first,base on your solution,i have a improved version. Here https://gist.github.com/kuitos/89e8aa538f0a507bd682

kuitos avatar Mar 10 '15 08:03 kuitos

+1

randallmeeker avatar Mar 13 '15 01:03 randallmeeker

+1

offminded avatar Apr 24 '15 12:04 offminded

@ThomasBurleson what does the G label mean?? It's not intuitively obvious as far as labels go.

ilanbiala avatar Apr 24 '15 21:04 ilanbiala

@ilanbiala - G is a label-used internally for core team purposes.

ThomasBurleson avatar Apr 24 '15 23:04 ThomasBurleson

+1

bartlomiejborzucki avatar May 01 '15 12:05 bartlomiejborzucki