Open valtido opened 7 years ago
Hi, the idea is great. I will think about it. The only one problem here - browser support.
Slider supports IE8+. toLocaleString is supported only by IE11+.
I will think about adding this feature to 3.x as an option.
A quick google search for a pollyfill, as a fallback https://github.com/willsp/polyfill-Number.toLocaleString-with-Locales just as an option :)
I was wondering if it would be ok to remove some functionality (deprecating) and then use the following as pretty printing using native locale support.
in the
prettify
function on this file, we should replace: https://github.com/IonDen/ion.rangeSlider/blob/master/js/ion.rangeSlider.js#L1860,L1863with the following:
then we can use proper locale from the init call.
Using the following as a reference to use more functions https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString#Examples
I could push a pull request if you are happy with this.
This would mean that the following would render useless :) and code clean up / refactoring is required.