JsDaddy / ngx-mask

Angular Plugin to make masks on form fields and html elements.
https://jsdaddy.github.io/ngx-mask
MIT License
1.16k stars 300 forks source link

To initialize a variable with a value, the mask is not being applied correctly #1299

Closed ViniciusRochaDcide closed 7 months ago

ViniciusRochaDcide commented 10 months ago

To initialize a variable with a value, the mask is not being applied correctly

image

https://stackblitz.com/edit/angular-nhtwrw?file=src%2Fmain.ts

"dependencies": { "@angular/animations": "^17.0.1", "@angular/common": "^17.0.1", "@angular/compiler": "^17.0.1", "@angular/core": "^17.0.1", "@angular/forms": "^17.0.1", "@angular/platform-browser": "^17.0.1", "@angular/router": "^17.0.1", "ngx-mask": "^17.0.4", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.2" }

shyambhiogade commented 8 months ago

you can try using following, [(ngModel)]="startTime"

andriikamaldinov1 commented 7 months ago

@ViniciusRochaDcide Thanks for using Ngx-mask. Please update to lates version. It example all work as expected - https://stackblitz.com/edit/stackblitz-starters-slqrk6?file=src%2Fmain.ts