反应输入货币掩码
我有一个货币输入(欧元),我使用反应输入掩码来纠正用户输入时的数字,但是我如何使用户能够输入“,”?他可以输入数字和“。”仅有的。
CurrencyInput
id="input-example"
name="input-name"
defaultValue={formatedResult}
decimalsLimit={2}
decimalSeparator=","
groupSeparator="."
onValueChange={(value, name) => console.log(value, name)}
/>
I have a currency input(euro), and i used the react input masking to correct the numbers while the user is typing, but how can i make the user able to type ','?He can type numbers and '.' only.
CurrencyInput
id="input-example"
name="input-name"
defaultValue={formatedResult}
decimalsLimit={2}
decimalSeparator=","
groupSeparator="."
onValueChange={(value, name) => console.log(value, name)}
/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以用这个。
You can use this.