react-native-slider icon indicating copy to clipboard operation
react-native-slider copied to clipboard

Support using slider to select a persons height

Open Korysam15 opened this issue 5 years ago • 2 comments

All,

I was curious if it is possible to use this slider to select a persons height in feet or meters? It's very close with the current implementation, however if I am incrementing by 0.1 and was 5"11' I wouldn't have this option due to the slider wanting to increment from 5.9 to 6.0.

Any suggestions on a way to do this with the current implementation of the Slider?

Code below:

<Slider trackStyle={customStyles4.track} thumbStyle={customStyles4.thumb} value={3} minimumValue={3} maximumValue={7} step={0.1} minimumTrackTintColor='#3C91E6' onValueChange={value => this.setState({ value })} />

Korysam15 avatar Dec 21 '18 05:12 Korysam15

you could always do the slider in meters, then convert the result from meters to feet like so: https://www.rapidtables.com/convert/length/meter-to-feet.html and showing the conversion to the user

BeauCarrel avatar Jan 09 '19 14:01 BeauCarrel

Thanks for the suggestion. I’ll try and get that to work

Korysam15 avatar Jan 09 '19 17:01 Korysam15