Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(filters): ensure formatNumber observes i18n decimal separators #12850

Closed
wants to merge 1 commit into from

Conversation

petebacondarwin
Copy link
Contributor

Closes #10342

@@ -214,6 +214,7 @@ function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {
if (fractionSize > 0 && number < 1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not directly related to the fix, but what happens if fractionSize is 0 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I see what happens :)

@lgalfaso
Copy link
Contributor

LGTM

@Narretz
Copy link
Contributor

Narretz commented Sep 15, 2015

Tangential, but do you know if the Number input type takes i18n into consideration?

@petebacondarwin
Copy link
Contributor Author

It doesn't look like the HTML5 input[number] control handles i18n at all: The value (http://www.w3.org/TR/html-markup/input.number.html#input.number.attrs.value) of the input must be a string representing a floating point number (http://www.w3.org/TR/html-markup/datatypes.html#common.data.float)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants