Skip to content

Commit

Permalink
Merge pull request #7377 from wuc656/patch-1
Browse files Browse the repository at this point in the history
fix: InputMask #7378
  • Loading branch information
tugcekucukoglu authored Mar 7, 2025
2 parents 495339b + 9a336c1 commit c22d943
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/primevue/src/inputmask/InputMask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,24 @@ export default {
return unmaskedBuffer.join('');
},
unmaskValue(value) {
let unmaskedBuffer = [];
let thisbuffer = value.split('');
for (let i = 0; i < thisbuffer.length; i++) {
let c = thisbuffer[i];
if (this.tests[i] && c !== this.getPlaceholder(i)) {
unmaskedBuffer.push(c);
}
}
return unmaskedBuffer.join('');
},
updateModelValue(value) {
if (this.currentVal === value) return;
const val = this.unmask ? this.getUnmaskedValue() : value;
const val = this.unmask ? this.unmaskValue(value) : value;
this.currentVal = value;
Expand Down

0 comments on commit c22d943

Please sign in to comment.