Skip to content

nouislider: Added decimals option#206

Open
MrKrabat wants to merge 2 commits intosurveyjs:masterfrom
MrKrabat:nouislider
Open

nouislider: Added decimals option#206
MrKrabat wants to merge 2 commits intosurveyjs:masterfrom
MrKrabat:nouislider

Conversation

@MrKrabat
Copy link
Copy Markdown
Contributor

@MrKrabat MrKrabat commented Aug 5, 2020

I have added the decimals option to set the desired number of decimal places. It defaults to 2, which is the default value for nouisliders. This means that this change is not code-breaking.

  • If you set decimals=0, the decimal places are completely removed. This is useful if step=1 is an integer.
  • If you set decimals=1, you get one decimal place. This only makes sense if step=0.1 is a floating point number. Otherwise you could not select such numbers.

Fixes #165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to remove the decimals on noUiSlider?

1 participant