Skip to content
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

Using stepsArray with MomentJS instances doesnt #487

Open
evenicoulddoit opened this issue Jan 13, 2017 · 3 comments
Open

Using stepsArray with MomentJS instances doesnt #487

evenicoulddoit opened this issue Jan 13, 2017 · 3 comments
Labels

Comments

@evenicoulddoit
Copy link

evenicoulddoit commented Jan 13, 2017

Demo: http://jsfiddle.net/5e78mxha/

The demo above works by using the vm.sliderOptions workaround, but using the vm.sliderOptionsBroken does not.

Expected behaviour

Using the stepsArray with MomentJS instances and using the translate option to translate the values to string literals should work.

Actual behaviour

Fails to bind correctly, though you can translate the values to string literals and use these are part of the stepsArray - the problem here is that the bindings are not what you'd what (i.e. the MomentJS instances).

@ValentinH
Copy link
Member

Indeed, stepsArray should contains values that can be compared with "===". The only exception are Date instances that are handled as well.

@evenicoulddoit
Copy link
Author

But having not meticulously looked through the code I'm not sure why === equality checking would make the above infeasible? The rz-slider-model and rz-slider-high values are both members of the stepsArray - I'm not attempting to compare "similar" moment instances?

@ValentinH
Copy link
Member

Yes you are right. At first sight, I don't understand what can be the issue and also, I haven't test this slider with ES6 so I don't know if your arrow functions are ok or not.

Anyway, I'm not maintaining this project anymore (or very rarely at least) so I can't help you much.

@ValentinH ValentinH added the bug label Mar 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants