This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Input type of number is good for small numbers, but for currency amounts over 999 the unformatted number being input is hard to read. Imagine having to type in 45,000,000 without the visual feedback of the commas. We can accomplish this with JavaScript (on an "input" event listener, e.g.): function localizeCurrency() { var oldValue = this.value; this.rawValue = oldValue ? parseInt(oldValue.replace(/,/g, '')) : 0; if (oldValue) { var newValue = parseInt(oldValue.replace(/,/g, '')).toLocaleString(); var caretPos = this.selectionStart - (oldValue.length - newValue.length); this.value = newValue; this.setSelectionRange(caretPos,caretPos); } } But it requires an input type of "text" (to allow the commas to appear), and it would be much better to have this in the HTML itself. <input type="currency" locale="usd"> As I type...what should appear 1 $1.00 10 $10.00 1000 $1,000.00 450000 $450,000.00
Moved to the HTML repo: https://github.com/w3c/html/issues/939