Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: input mask mask placeholder

jcarvalho 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


jcarvalho 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


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 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 priority commented 4 months ago

Can you please help me with the example?



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

  • ForumUser: Priority
  • 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