primeng icon indicating copy to clipboard operation
primeng copied to clipboard

InputNumber control with Norway locale ('nb-NO') cannot input minus (-) sign for negative numbers.

Open dinhtruonggiang opened this issue 6 years ago • 3 comments

I cannot put minus (-) sign for negative numbers with locale 'nb-NO' in InputNumber control. However, I can enter negative numbers with other locales, such as "en-US" or "de-DE":

<p-inputNumber name="total" [(ngModel)]="total" [minFractionDigits]="2" locale="nb-NO" suffix=" kr">

dinhtruonggiang avatar Jun 20 '20 10:06 dinhtruonggiang

I am also getting the same irrespective to locale this control not allowed to enter minus sign initially but after number entered we can enter the minus sign at beginning

priyanhsu10 avatar Jun 29 '20 08:06 priyanhsu10

Thanks a lot for your feedbacks! Could you please test these issues on PrimeReact inputNumber? https://primefaces.org/primereact/showcase/#/inputnumber if it works fine for you, I can add new improvements to PrimeNg. This component is open to user experiences. Therefore, feedback is important to us.

Note: I'll try locale="nb-NO" on PrimeReact Inputnumber and get back to you.

Thanks again! Best Regards,

mertsincan avatar Aug 21 '20 14:08 mertsincan

Hi,

As you know, InputNumber component uses Intl.NumberFormat API; https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat Could you please try it? I think this issue is related to Unicode. Please see the minus signs in the screenshot. They are not the same. One of them is thin and the other is thick. locale_check

Maybe, the minus sign can be Hyphen-minus; https://en.wikipedia.org/wiki/Plus_and_minus_signs I'm not sure :/

mertsincan avatar Sep 01 '20 12:09 mertsincan