input mask mask placeholder


Topic: input mask mask placeholder

jcarvalho pro premium priority asked 4 months ago

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 staff answered 4 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 4 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 4 months ago

Can you please help me with the example?


jcarvalho pro premium priority answered 4 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


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • 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
Tags