Skip to content

NumberInput 无法正确格式化以色列等国家的负数值 #28057

Closed
react-component/input-number
#279
@xuqiang1227

Description

@xuqiang1227
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

以色列等国家的负数格式显示为:-x.xxx.xxx,xxx

也就是千分位分隔符为 ., 小数点为: ,

当输入值为 -88888888888.88 应该格式化为: -88.888.888.888,88 ,但实体上显示为: -88,888.888.888,88

格式化正则表达式为:/\B(?=(\d{3}) (?!\d))/g

What is expected?

当输入值为 -88888888888.88 应该格式化为: -88.888.888.888,88

What is actually happening?

实际上显示的为: -88,888.888.888,88

Environment Info
antd 4.8.6
React 16.14.0
System window 10
Browser chrome 87

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions