When an inputNumber control is used, with the minFractionDigits attributes explicitly set to null, then the default value used by the control is 0. This is contrary to what is described in the documentation (https://primeng.org/inputnumber#api.inputnumber.props.minFractionDigits), where it says "the default for currency formatting is the number of minor unit digits provided by the ISO 4217 currency code list", which should be 2 in this case
In the angular component, the relevant properties are set as follows:
public minFractionDigits?: number | null = null;
public maxFractionDigits?: number | null = null;
In this case, no fractional digits are shown
If the html is changed to remove the two properties altogether, then it works as expected. However "null" is meant to be the default value, and so you would expect it to work when the properties are set to this
Issue occurs in PrimeNg 17.12.0 but not in 17.14.1 (17.13.0 had another issue where the fields became readonly in this instance)
Describe the bug
When an inputNumber control is used, with the minFractionDigits attributes explicitly set to null, then the default value used by the control is 0. This is contrary to what is described in the documentation (https://primeng.org/inputnumber#api.inputnumber.props.minFractionDigits), where it says "the default for currency formatting is the number of minor unit digits provided by the ISO 4217 currency code list", which should be 2 in this case
For example, the html being used is this:
In the angular component, the relevant properties are set as follows:
In this case, no fractional digits are shown
If the html is changed to remove the two properties altogether, then it works as expected. However "null" is meant to be the default value, and so you would expect it to work when the properties are set to this
Issue occurs in PrimeNg 17.12.0 but not in 17.14.1 (17.13.0 had another issue where the fields became readonly in this instance)
Environment
Windows 10
Reproducer
https://stackblitz.com/edit/w7v6fx?file=src%2Fapp%2Fdemo%2Finput-number-currency-demo.html
Angular version
17.3.1
PrimeNG version
17.14.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.19.0
Browser(s)
Edge
Steps to reproduce the behavior
Expected behavior
Default should be 2 minimum fraction digits