Topic: mdbInputMask issue with copy-paste value
Piotr Mszyca premium asked 7 months ago
Expected behavior When mdbInputMask="999-999-99-99" is applied to the text input field and user copy paste value "0123456789" the input field should show properly formatted value according to the above mask like: "012-345-67-87".
Actual behavior However the mdbInputMask directive instead of adding dashes between the digits it replaces some digits with dashes what cause that the value itself is incorrect. In example for the above case it looks like: "012-456-87-".
Resources (screenshots, code snippets etc.)
<mdb-form-control>
<input mdbValidate mdbInput
mdbInputMask="999-999-99-99"
[inputPlaceholder]="false"
[maskPlaceholder]="true"
[clearIncomplete]="false"
[validateSuccess]="false"
type="text"
[id]="'id_nip'"
class="form-control"
[formControl]="formControl"/>
<label mdbLabel class="form-label" [ngClass]="{'required': required}" [for]="'id_nip'">NIP</label>
</mdb-form-control>
Closed
This topic is closed.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Closed
- ForumUser: Premium
- Premium support: Yes
- Technology: MDB Angular
- MDB Version: MDB5 6.0.0
- Device: PC
- Browser: chrome
- OS: windows
- Provided sample code: No
- Provided link: No