NumericTextBoxComponent with p4 as format

Hi

Currently, the implementation of p4 in the format is a bit misleading.
The user enters 15 but behind the scenes, it turns into 1500%. He needs to enter 0.15 in order to see 15%.
I want the user to enter 15 and see 15 and also, to show the percentage symbol.
Is it possible using NumericTextBoxComponent?

Thanks

3 Replies 1 reply marked as answer

SN Sevvandhi Nagulan Syncfusion Team May 5, 2021 11:10 AM UTC

Hi Amos, 


Greetings from Syncfusion support. 


We checked your query. The custom format for numeric textbox component can be used to achieve the reported requirement. Kindly refer the following code. 


<NumericTextBoxComponent value={10} format = {"#######0.#####'%'"}> 
</NumericTextBoxComponent> 



Please find the sample below. 




Kindly get back to us for further assistance. 


Regards, 
Sevvandhi N 


Marked as answer

AM Amos May 5, 2021 11:55 AM UTC

Thanks, it works.

May I ask what is the reason for the current implementation of format="p2" ?
It's kinda confusing.


SN Sevvandhi Nagulan Syncfusion Team May 6, 2021 07:24 AM UTC

Hi Amos, 


Thanks for the update. 


We checked your query. The format = “p2” represents the percentage type. If we use percentage formats like p2, it means that a given value will be multiplied by 100 and a percent symbol (%) will be appended to the end of the value. Kindly refer the below documentation for more information about the percentage format. 




Kindly get back to us for further assistance. 


Regards, 
Sevvandhi N 


Loader.
Up arrow icon