Open johnatandantas opened 6 years ago
Sorry for the late reply: what do you mean with "mask"? Could you provide an example please?
yep input mask like textmask is not working, i tryed to use a mask for phone like (99) 9999-9999 and the key position don`t work correct? Is a way to work correct with mask?
I have the same issue and am looking for a workaround. Any/all input validation seems to be overridden/bypassed when the keyboard directive is present.
Just in case anyone still interested, here is the solution. You have to force the control to re-evaluate on each change. You have to make your own directive for the input. Then in directive> In constructor add: @Optional() @Self() private control?: NgControl private elementRef: ElementRef
then for example onInit:
this.elementRef.nativeElement.addEventListener("input", (event) => { this.control.control.setValue(this.elementRef.nativeElement.value); this.control.control.updateValueAndValidity(); });
Help, I'm using the virtual keyboard, it works perfectly when I do not use mask, but when I put a mask in the field it does not format the field. I've already downloaded the demo from vcs and add a mask component and it continues the same thing. I do not know what else to do. Help me.