Using kirby-input with kirby-decimal-mask and setMaxOnOverflow = true, fails to correcly format numbers when running in danish locale.
Describe how to reproduce the bug
Setting value = 120000.25 and max = 160001.25 in kirby-input field.
When using english locale, typing a new value of eg. 161000 results in the value being replaced by the max value 160,001.25 (nicely formatted).
When using danish locale, typing a new value of 161000 doesn't trigger a change. The same is the case if ,00 is typed as decimals - no effect. Typing a way to large number like eg 161000000 results in the input being replaced with 16.000.125 (formattet, but way larger than the max allowed value).
Which Kirby version was used?
9.6.0
What was the expected behavior?
When running in danish locale, I expect 161000 to be replaced by the formatted max value 160.000,25.
Add any screenshots
Added two screen recordings in danish and english, to show the different behaviours.
Please complete the following information:
OS: macOS
Browser: Chrome
Browser version: 128.0.6613.138
Are there any additional context?
Rasmus Kjeldgaard has acknowledged there is a bug when using the group-separator in conjunction with kirby-input / kirby-decimal-mask, and danish locale.
Checklist:
The following tasks should be carried out in sequence in order to follow the process of contributing correctly.
Verification
To make sure the bug is not intended behaviour; it should be verified by a member of team Kirby before moving on to implementation.
[ ] Make sure the NOT verified label has been removed by a member of team Kirby; do not proceed until this is done.
Implementation
The contributor who wants to implement this issue should:
Describe the bug
Using kirby-input with kirby-decimal-mask and setMaxOnOverflow = true, fails to correcly format numbers when running in danish locale.
Describe how to reproduce the bug
Setting value = 120000.25 and max = 160001.25 in kirby-input field.
When using english locale, typing a new value of eg. 161000 results in the value being replaced by the max value 160,001.25 (nicely formatted).
When using danish locale, typing a new value of 161000 doesn't trigger a change. The same is the case if ,00 is typed as decimals - no effect. Typing a way to large number like eg 161000000 results in the input being replaced with 16.000.125 (formattet, but way larger than the max allowed value).
Which Kirby version was used?
9.6.0
What was the expected behavior?
When running in danish locale, I expect 161000 to be replaced by the formatted max value 160.000,25.
Add any screenshots
Added two screen recordings in danish and english, to show the different behaviours.
Please complete the following information:
Are there any additional context?
Rasmus Kjeldgaard has acknowledged there is a bug when using the group-separator in conjunction with kirby-input / kirby-decimal-mask, and danish locale.
Checklist:
The following tasks should be carried out in sequence in order to follow the process of contributing correctly.
Verification
To make sure the bug is not intended behaviour; it should be verified by a member of team Kirby before moving on to implementation.
NOT verified
label has been removed by a member of team Kirby; do not proceed until this is done.Implementation
The contributor who wants to implement this issue should:
Review
Once the issue has been implemented and is ready for review:
https://github.com/user-attachments/assets/8a08c1e4-0231-427f-8885-4366ec7c3f1a
https://github.com/user-attachments/assets/f3f9d5da-10e9-4c42-8c8b-b1689ec1acc3