Skip to content

Conversation

YannickMG
Copy link
Contributor

@YannickMG YannickMG commented May 20, 2025

Adds TextFieldWidget::setFormatAsInteger that formats a number as an integer with group separators. Not perfect, explicitly doesn't work with floating point numbers, but it's a start.

@Caedis
Copy link

Caedis commented May 20, 2025

Does that automatically get the locale correct group separator?

@YannickMG
Copy link
Contributor Author

Does that automatically get the locale correct group separator?

Yes. In 1.7.10 I had to override the locale to not get broken string separators in MUI2's local dev.
image

For 1.7.10 we can either force the locale or go with the option of patching the font file.

@YannickMG
Copy link
Contributor Author

YannickMG commented May 20, 2025

It's not quite ready yet I think.

I got this by typing at the end of the number:

java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 7

@YannickMG YannickMG marked this pull request as draft May 20, 2025 21:01
@YannickMG YannickMG force-pushed the feature/number-field-widget branch from 38b738c to f9dc674 Compare May 21, 2025 00:51
@YannickMG YannickMG force-pushed the feature/number-field-widget branch from f9dc674 to 8d67eee Compare May 21, 2025 00:54
@YannickMG YannickMG marked this pull request as ready for review May 21, 2025 00:56
@YannickMG YannickMG changed the title Add experimental IntegerFieldWidget Add TextFieldWidget::setFormatAsInteger May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants