Topic: input mask mask placeholder
Hello,
Need help on Inputmask,. want to have mask placeholder as #.
currently 99/99/9999 accepting as for dates.
For example , date field : ##/#/####, for number field , ########
let elem = document.getElementById(fieldId); var msk = Inputmask.getInstance(elem); if(msk == null){ new Inputmask(elem, { inputMask: mask, clearIncomplete: true }); }
Can you please provide a sample to display with # in text field.?
Grzegorz Bujański
answered 10 months ago
Unfortunately the code you added seems to be incomplete.
But if I understand correctly, you would want to change the placeholder to #
even if the input is not focused?
jcarvalho pro premium priority commented 10 months ago
function applyMask(fieldId){let elem = document.getElementById(fieldId); var msk = Inputmask.getInstance(elem); f(msk == null){ new Inputmask(elem, { inputMask: mask, clearIncomplete: true,});}}
Here is the function that i have. Want to display the ##### in the input text field allow digits only in text field
jcarvalho pro premium priority commented 10 months ago
Can you please help me with the example?
jcarvalho
pro premium priority answered 10 months ago
function applyMask(fieldId){let elem = document.getElementById(fieldId); var msk = Inputmask.getInstance(elem); f(msk == null){ new Inputmask(elem, { inputMask: mask, clearIncomplete: true,});}}
Here is the function that i have. Want to display the ##### in the input text field allow digits only in text field
Grzegorz Bujański
answered 10 months ago
do you mean something like this? https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/6200351
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 7.1.0
- Device: mac
- Browser: google chrome
- OS: Mac Os
- Provided sample code: No
- Provided link: No