html5 input for money/currency

前端 未结 7 1504
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 01:55

I seem unable to work out what to use for accepting monetary values on a form.

I have tried...



        
7条回答
  •  自闭症患者
    2020-12-08 02:07

    We had the same problem for accepting monetary values for Euro, since can't display Euro decimal and comma format.

    We came up with a solution, to use for user input. After user types in the value, we format it and display as a Euro format by just switching to . This is a Javascript solution though, cuz you need a condition to decide between "user is typing" and "display to user" modes.

    Here the link with Visuals to our solution: Input field type "Currency" problem solved

    Hope this helps in some way!

提交回复
热议问题