githuboftigran / rn-range-slider

A native slider with range
MIT License
237 stars 133 forks source link

Any possibility to range hours? #21

Closed macscripter closed 4 years ago

macscripter commented 5 years ago

Hey, is it possible to show hours? Something like [08:15, 21:45]. Let's suppose that the 15 minutes would be ok.

githuboftigran commented 5 years ago

Currently textFormat prop is a simple formattable string so it's not possible to have an executable code for label text.

macscripter commented 5 years ago

Ok, but what if we the string just outputs something like "4:15" for input 4.25, "4:30" for input 4.5? Is it hard to implement? We're talking about a mask, not a number that makes sense to leave it as is. By the way, great library! Thank you!

githuboftigran commented 4 years ago

@macscripter , good point, will think about this. Actually I have some plans regarding textFormat. Will try to include this "hour-formatting" in future. Closing this issue as it isn't in fact an issue.

githuboftigran commented 4 years ago

@macscripter , Now you can pass a prop valueType: 'time' and textFormat: 'HH:mm' for example. You can pass Date objects as values and get Date objects in value change listener. In other words, time range is fully supported :)