jQuery-Mask-Plugin
jQuery-Mask-Plugin copied to clipboard
Does not mask pre-loaded input
Have you take a look into our docs?
yeah
Device
[Win10]
Browser (and version)?
Chrome|Firefox
Functional jsfiddle exemplifying your problem:
https://jsfiddle.net/barrychapman/L584kupw/6/
Describe de problem depth:
The issue is that when a value exists in an input field (such as editing an existing record), it does not parse it properly.
It should really perform a RegEx replace against the mask that has been defined.
So in my case, my mask consists of integers - (999) 999-9999
All characters -except- for integers should be removed, and then the mask should be applied to the raw integers. Otherwise you end up with offsets like you see in the fiddle.
Is this plugin helping you out? Buy me a beer and cheers! :beer: sort of :)
:bowtie: https://www.paypal.me/igorcescobar
You need characters "-"? if not remove, mask will work fine
Just remove mask characters from the value. In your sample in jsfiddle replace 248-425-865 with 2484258651.