How can I stop this?
If I attempt to preventDefault in the (keydown) event it doesn't work, because the event is bound to the p-inputNumber element, rather than the underlying input element.
I'm sure there's some obvious thing that I've missed, but I can't find it anywhere.
Thanks.
p-inputNumber keyup and keydown causing number value to increment
-
- Posts: 1
- Joined: 04 Feb 2022, 16:49
Hi,
did you manage to solve this? have similiar request - stop up/down arrow keys on p-innputNumber.
did you manage to solve this? have similiar request - stop up/down arrow keys on p-innputNumber.
-
- Posts: 10
- Joined: 26 Jul 2017, 08:17
There is an issue to trigger an update with every entry, there is a pull request for this.
There is no obvious solution to this yet.
There is no obvious solution to this yet.
-
- Posts: 1
- Joined: 18 Apr 2022, 19:54
Setting step="0" on the p-inputNumber will stop the increment/decrement with the arrow-up and arrow-down
<p-inputNumber
[(ngModel)]="rate"
mode="currency"
currency="USD"
locale="en-US"
(keydown)="keypress($event)"
step="0"
></p-inputNumber>
<p-inputNumber
[(ngModel)]="rate"
mode="currency"
currency="USD"
locale="en-US"
(keydown)="keypress($event)"
step="0"
></p-inputNumber>
-
- Posts: 2
- Joined: 25 Apr 2022, 18:58
Formatação em Real - BR
<p-inputNumber mode="currency" currency="BRL" locale ="pt-BR"></p-inputNumber>
<p-inputNumber mode="currency" currency="BRL" locale ="pt-BR"></p-inputNumber>
-
- Information
-
Who is online
Users browsing this forum: No registered users and 29 guests