Skip to content

Commit 50f727d

Browse files
authored
Create readme.md
1 parent e31f344 commit 50f727d

File tree

1 file changed

+7
-0
lines changed
  • Client-Side Components/Catalog Client Script/Percentage Symbol

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Sets the field value to the formatted percentage string (e.g., 45 becomes 45.00%).
2+
3+
Retrieves the current value of the field.
4+
Removes any existing % symbol to avoid duplication.
5+
Validates the input to ensure it's a number.
6+
Converts the value to a float.
7+
Formats it to two decimal places and appends a % symbol.

0 commit comments

Comments
 (0)