4

In Lightning Web Components (LWC) the 'lightning-input' component supports a 'formatter' attribute which has value 'currency' and this displays decimal values with currency formatting, for example:

1.518,71 €

was output by:

<lightning-input type="number" step=".01" formatter="currency" value={totalAmount}>
</lightning-input>

However, this appears to use the Currency setting on the User's record (in this case 'EUR'). Is there any way this can be formatted as a different currency (e.g. 'CHF' or 'USD') and/or in the currency of the salesforce record from which the field was retrieved?

1 Answer 1

0

Currently, there is no built-in way to achieve different currency formatting with the lightning-input component in Salesforce. However, there is an Idea on IdeaExchange requesting this feature.

For now, you would need to create a custom component for that, the Component Blueprint for Input provides a useful starting point.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .