-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[Bug Report][3.6.5] (VNumberInput): interpretes negative numbers as NaN #19798
[Bug Report][3.6.5] (VNumberInput): interpretes negative numbers as NaN #19798
Comments
The same happens when chars like 'e' or '+' are entered for number is exponent format like 4e+100 |
@kchobantonov I don't see much value to support exponent format in number-input, can't you use text-field instead? |
@yuwu9145 yes I can use that but then I need to use that for all numbers since I do not know upfront in what kind of format those number are going to come when loading the forms (e.g. when the data is already specified) |
It also happens when I'm writing decimals like 3.5, but when I do a missclick and put there two dots, like 3..5, then it's automatically changed to NaN - I would expect it will automatically ignore second dot, cause this will be common mistake. Also when starting with dot (e.g: .5). it'ts changed to NaN, guess it should be changed to 0.5 or ignored. |
Environment
Vuetify Version: 3.6.5
Vue Version: 3.4.27
Browsers: Chrome 124.0.0.0
OS: Windows 10
Steps to reproduce
-
)(Copy&Pasting a minus also causes same behavior)
Expected Behavior
The input field should accept negative numbers if the
min
prop is set to a value less than zeroActual Behavior
As soon as you enter a minus, the input will be replaced with a literal string of
NaN
.Reproduction Link
https://play.vuetifyjs.com/#...
Other comments
This may relate to the following issue:
#2359
The text was updated successfully, but these errors were encountered: