-
-
Notifications
You must be signed in to change notification settings - Fork 661
when calling slider.noUiSlider.get() the values returned are an array of strings not numbers #813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's not explicit in the documentation and I'll update that, but the return type is definitely supposed to be |
Updated the docs. Thanks for reporting! |
see this related issue that is now closed: leongersen/noUiSlider#813 When calling get type should be strings
It is definitely returning a string. I'm not sure how the above is possible. This is not a bug. |
Are you using a |
Yup that was the case, my bad! |
I think I'll leave that like it is, but it'll have to be in the docs. |
Docs updated! |
@leongersen Just wondering if the get type def indicates it returns strings, should the set type def accept strings as params? the definition file in the definitely typed repo version 9.0.0 shows that set accepts a number array. Can you clarify? Thanks |
@jimwards17 it should; it accepts strings and uses the |
noUiSlider should return an original raw value instead of a formatted string because valuable information gets lost during formatting and a user can easily format the raw value. For example I use the slider to select a range of timestamps. The values are formatted as "month-day hour". The information about year is lost and I need it to rebuild the timestamp. |
@ivanbulanov It will return any value your |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm not sure if this is a bug, but I am using typescript with a definition file for noUiSlider gathered from the definitely typed repository.
This definition file indicates the type of the value returned from slider.noUislider.get() is a number[]. However it is actually returning a string[].
Shouldn't it be numbers?
The text was updated successfully, but these errors were encountered: