Automatically sign input value based on valueRange
See original GitHub issueHi,
I’m currently in a situation where multiple v-currency-fields should only allow negative values. I can use the valueRange option for that, which is a nice technical solution for “implicit validation”.
But from an end-user point of view, it would be nice if the value has its sign automatically “added”, based on the valueRange option (eg: multiply Math.abs(value)
by -1
when max < 0
and min >= Number.MIN_SAFE_INTEGER
).
Of course, to allow for switching this feature on and off, there may be a need for an extra autoSign
option?
Or would there be another approach to this?
Thanks, Glenn
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
<input type="range"> - HTML: HyperText Markup Language
elements of type range let the user specify a numeric value which must be no less than a given value, and no more...
Read more >HTML5 input type range show range value - Stack Overflow
I am making a website where I want to use range slider(I know it only supports webkit browsers). I have integrated it fully...
Read more >Value Bubbles for Range Inputs | CSS-Tricks
Here we're making sure we account for the range inputs min and max attributes and calculating a % position between 0-100 based on...
Read more >[MS-OGRAPH]: ValueRange | Microsoft Learn
This record specifies the properties of a value axis. ... A - fAutoMin (1 bit): A bit that specifies whether numMin is calculated...
Read more >How to assign a value or category based on a number range ...
1. Select a blank cell, enter the following formula and press the Enter key. Select the result cell, drag its AutoFill Handle down...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, thanks for your suggestion. I think it’s a nice idea which is also capable to replace the existing
allowNegative
option for forcing positive values. I will have a look at it 👍@dm4t2
Nice one!