Closed adamdbradley closed 8 years ago
Are there plans in v2 to include a range slider similar to the Ionic 1 range slider (single knob)?
Agree. Need a slider, a common useful component.
+1
+1
+1
Does anyone know of an ETA or easy substitute for this feature? My app requires a native-looking range element.
@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 Alright, thanks. That library should make things a bit less messy.
@Taconut if you come across a better solution, please do share. That library does unfortunately rely on jQuery.
@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.
@pheonixgao Mind sharing your work? I looked into doing that myself, but it seemed like a rather messy transition.
@Taconut You can copy from here all selectors with .range
. Worked like a charm
@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')
@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 no it was for a single value :) @phoenixgao thanks!
Please add range component in ionic2
yea please add a range componente :+1:
+1
+1
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:
Can we add custom label tooltips (instead of showing numbers) when we change the slider? I wanted to use it for 'Office hours' (from 9AM to 6PM). I wanted to show a slider with 2 knobs. It starts at '7AM' and ends at '10PM' and user can select a range. When user changes the slider, the tool should show selected time like 9AM, 10AM etc. But tooltip always shows number, which is what I want to customise.
Thanks for Awesomionic!
@megharajdeepak Could you create a new issue for this as a feature request please? :)
Sure, I'll do that. Any work arounds or hacks to get it work for now?
@megharajdeepak I think as a temporary solution you may want to use ionChange, there get a handle to pin html element and replace the value there.. looks ugly but may work as a temporary solution.....
Is anything like this suggestion of @megharajdeepak planned? I would love to use the slider component for choosing times, as well. Any chance you can change the format of the number shown in the pin?
@megharajdeepak did you opened a new issue for a feature request? Can you please link it here?
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Allow multiple knobs