0

I am using lightning:input to display a currency value

<lightning:input aura:id="fee" type="number" formatter="currency" 
                 label="Fee" name="fee" value="{!v.feeObj.Fee__c}" step="0.01"/>

What I need is a dollar sign beside the currency value. However that is not happening.

I tried with

<lightning:formattedNumber value="{!v.feeObj.Fee__c}" style="currency" 
                           currencyCode="USD" currencyDisplayAs="symbol"/>

But in this case the field is not being displayed at all.

  • Do you have a screenshot of the current behavior? You will only get the $ sign (assuming that's the currency type) once you have finished typing in the input box and the focus is moved out of the component. – Jayant Das Mar 22 at 14:56

Your Answer

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

Browse other questions tagged or ask your own question.