ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.08k stars 13.51k forks source link

feat: support for decimal/fractional/floating-point numbers on ion-range #23362

Closed nunoarruda closed 1 year ago

nunoarruda commented 3 years ago

Feature Request

Ionic version: [x] 5.x

Describe the Feature Request

Can you add support for decimal/fractional/floating-point numbers on ion-range? It looks like ion-range currently only supports integers and I'm currently working on an Ionic project that requires a slider with decimal numbers. It also looks like other developers were/are trying to do the same:

Describe Preferred Solution

I would like, for example, to have an ion-range with min="0", max="3" and step="0.1". So it would step from 0, 0.1, 0.2, 0.3, etc...

Describe Alternatives The following 3 alternatives support decimal steps. Angular Material Slider: https://material.angular.io/components/slider/overview#selecting-a-value ngx-slider: https://angular-slider.github.io/ngx-slider/demos#floating-point-slider noUiSlider: https://refreshless.com/nouislider/

averyjohnston commented 1 year ago

Thank you for the request! It looks like this was added at some point, but the issue was never closed out. Here's an example with the latest version of Ionic: https://stackblitz.com/edit/angular-pchpvp?file=src%2Fapp%2Fexample.component.html

ionitron-bot[bot] commented 1 year ago

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.