Skip to content

Commit

Permalink
Fixed #9516 - InputNumber - unable to enter negative with minFraction…
Browse files Browse the repository at this point in the history
…Digits set
  • Loading branch information
mertsincan committed Sep 6, 2021
1 parent 6c55d36 commit e7fc489
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/components/inputnumber/inputnumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ export class InputNumber implements OnInit,ControlValueAccessor {
}

allowMinusSign() {
return this.min === null || this.min < 0;
return this.min == null || this.min < 0;
}

isMinusSign(char) {
Expand Down Expand Up @@ -830,11 +830,11 @@ export class InputNumber implements OnInit,ControlValueAccessor {
}

validateValue(value) {
if (this.min !== null && value < this.min) {
if (this.min != null && value < this.min) {
return this.min;
}

if (this.max !== null && value > this.max) {
if (this.max != null && value > this.max) {
return this.max;
}

Expand Down

0 comments on commit e7fc489

Please sign in to comment.