Decimal dot and thousands separator used both in input type number

Petya Naumova

How is possible to use both decimal dot and thousands separator in input type="number", more specifically within AngularJS model? For example, the numeric value the user be able to write, should look like this: 3,597.50. Also, I have to make a check if the entered data is a number or a string which I make with isNaN(). I tried someNumber.toFixed(2), where someNumber is a variable, containing the number which the user has entered but it doesn't work.

Gustavo Gabriel

Have you tried https://github.com/aguirrel/ng-currency ?

Its pretty decent...

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

NumericUpDown: accept both comma and dot as decimal separator

seq uses both comma and dot as a decimal separator

Regular expression to match number with Decimal separator and optional Thousands separator

html tag input of type=”number” and culture based decimal separator

TextField both KeyboardType.Number and KeyboardType.Decimal allows to type decimal separator

Parsing decimal with thousands separator

Format number in R with both comma thousands separator and specified decimals

Modify decimal point and thousands separator without changing the number of decimals

How to accept both dot and comma as a decimal separator with WTForms?

How to force dot on thousands separator?

Thousands separator in sql with dot in bigquery

Add thousands separator in a number

Is there any option to store a number as text with a specific format (comma as thousands separator and period as decimal separator) in Snowlake?

Convert String with Dot or Comma as decimal separator to number in JavaScript

Java Double to String with dot separator and infinite number of digits after the decimal

VueJS - add thousands separator to input

Number formatting, remove thousands separator

Adding thousands separator "˙" to a float number

Format a decimal with comma as decimal separator and without thousands separator

Input type number, decimal value

Formatting a decimal number similar to ToString("G29") plus a thousands separator

Convert string with thousands (and decimal) separator into double

RadGridView Thousands Separator for Decimal Column While Editing

Change decimal and thousands separator in axis and tooltip

JavaScript regex to accept numbers with comma separator (thousands) and dot separator (decimals)

Cannot validate dot for input type number

Is it possible to format number with thousands separator using fmt?

Center Text QML type based on the dot of a decimal number

Allow 2 decimal places in <input type="number">