globalize icon indicating copy to clipboard operation
globalize copied to clipboard

parseNumber not returning NaN for trailing decimal

Open xtgrant opened this issue 6 years ago • 1 comments

I'm using latest version. Trying to parse a number onKeyUp in en locale. Globalize("en").numberParser()("123.") // returns the value 123 Shouldn't this return NaN?

xtgrant avatar May 12 '20 00:05 xtgrant

This is expected (since some use cases depend on this feature [1]) thought it could be revisited if there's strong argument against it.

1: Incrementally parsing a number input (as typed).

rxaviers avatar Aug 16 '21 12:08 rxaviers