Hi I refreshed my org in order to have the latest changes from Spring 20' release, and I noticed a change in the input type currency when I try to type the decimal value separated by a dot ('.'), it's not recognised at all so 123.45 on the input is read as 12345. Anyone found a similar issue?

I even tried the example found in their documentation of LWC input type currency: https://developer.salesforce.com/docs/component-library/bundle/lightning-input/example

Edit: Seems to happen with Spanish (Spain) locale but in another org without Spring 20' and the same locale it works


For lightning-input working as a currency you should use :

  1. type="number"
  2. formatter="currency"
  3. step= (say) "0.01"

For example -

<lightning-input type="number" name="input1" label="Enter a currency" formatter="currency" value={val} onchange={setVal} step="0.01"></lightning-input>

Take a good idea of "step" attribute from here - Lightning:inputField not allowing decimal numbers to be inserted

  • I have that as I stated I copied the standard example and it's not working properly as of Spring 20' preview, the example is: <lightning-input type="number" name="input7" label="Number field with currency formatter" value="123.45" formatter="currency" step="0.01"></lightning-input> – Onceler Kenpachi Jan 23 '20 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.