Open tihcamos opened 4 days ago
When using the NumberParser from @internationalized/number, I encountered an issue where the string '1,1,1.2' is being parsed incorrectly as 111.2.
NumberParser
@internationalized/number
'1,1,1.2'
111.2
The input string '1,1,1.2' should throw a parsing error (since it is not a valid number format in any locale),
The input string '1,1,1.2' is parsed as 111.2, which appears to ignore the commas inappropriately and concatenate the numbers.
No response
Import and initialize NumberParser:
import { NumberParser } from '@internationalized/number'; const parser = new NumberParser('en-US'); // Example locale const result = parser.parse('1,1,1.2'); console.log(result); // Outputs: 111.2
3.5.4
Chrome
Windows 11
Provide a general summary of the issue here
When using the
NumberParser
from@internationalized/number
, I encountered an issue where the string'1,1,1.2'
is being parsed incorrectly as111.2
.๐ค Expected Behavior?
The input string
'1,1,1.2'
should throw a parsing error (since it is not a valid number format in any locale),๐ฏ Current Behavior
The input string
'1,1,1.2'
is parsed as111.2
, which appears to ignore the commas inappropriately and concatenate the numbers.๐ Possible Solution
No response
๐ฆ Context
No response
๐ฅ๏ธ Steps to Reproduce
Import and initialize
NumberParser
:111.2
instead of an error or a correctly parsed value.Version
3.5.4
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Windows 11
๐งข Your Company/Team
No response
๐ท Tracking Issue
No response