We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
whenever i format <input type="number" /> I get the error
<input type="number" />
The specified value "1,212" cannot be parsed, or is out of range This is my JS code
The specified value "1,212" cannot be parsed, or is out of range
const cleaveZen = window.cleaveZen; const { formatNumeral } = cleaveZen; const currencyInputs = document.querySelectorAll(".currencymask"); currencyInputs.forEach((currencyInput) => { currencyInput.addEventListener("input", (e) => { currencyInput.value = formatNumeral(e.target.value, { numeralThousandsGroupStyle: "thousand", }); }); });
The text was updated successfully, but these errors were encountered:
It works if you use type="text"
<label> <input class="currency-input" type="text" value = "12345.8" /> </label>
Sorry, something went wrong.
Besides using type="text" as @pakacoder noted, to keep the numeric input on mobile keyboards, add inputmode="numeric"
type="text"
inputmode="numeric"
reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode#numeric
No branches or pull requests
whenever i format
<input type="number" />
I get the errorThe specified value "1,212" cannot be parsed, or is out of range
This is my JS code
The text was updated successfully, but these errors were encountered: