igorescobar / jQuery-Mask-Plugin

A jQuery Plugin to make masks on form fields and HTML elements.
http://igorescobar.github.io/jQuery-Mask-Plugin/
Other
4.77k stars 1.42k forks source link

Issue with 0 sign, wrong mask #730

Open AizSedaj opened 4 years ago

AizSedaj commented 4 years ago

Browser (and version)?

firefox 71.0

Functional jsfiddle exemplifying your problem:

http://jsfiddle.net/d2p7590b/ $('#phone-field').mask("+380(99)999-99-99", {placeholder: "+380(__)___-__-__"});

Describe the problem depth:

When the number include 0 in decor part, it used for masking too. How to use zero in decor?

code-chip commented 4 years ago

Também tenho essa dúvida, preciso fixar o zero na máscara.

Shagshag commented 4 years ago

Solved my similar issue like this :

$('input.date').mask(
    '00/00/2Z00', 
    {
        translation: {
            'Z': {
                pattern: /0/,
                fallback: '0',
            },
        },
        placeholder: "__/__/20__"
    }
);