You need to sign in to do that
Don't have an account?
VenkataRamanjaneyulu Kattamuru
Bug? Lightning Input tag when type= "Number" is accepting only one character called "e"
Hi,
Just now , I saw that lightning input tag is accepting a character called "e" evenhough type is a number.
May be there is a bug in this component.
Thanks&Regards,
Venkat Kattamuru.
Just now , I saw that lightning input tag is accepting a character called "e" evenhough type is a number.
May be there is a bug in this component.
<lightning:input type="number" name="number" label="Number" />
Thanks&Regards,
Venkat Kattamuru.
Greetings to you!
1e1 is a valid number, that's an exponential notation: https://en.wikipedia.org/wiki/Scientific_notation#E_notation
The number input can accept floating-point numbers, including negative symbols and the 'e' or 'E' character.
Please refer to the below links which might help you further.
https://stackoverflow.com/questions/31706611/why-does-the-html-input-with-type-number-allow-the-letter-e-to-be-entered-in/31706796#31706796
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Thank you for your response.
As per your answer ,it have to accept 20e but it was throwing an error as shown below.
Thanks&Regards,
Venkat.