0

I'm trying to set a mask to code area, but the right parentheses never appears.

       $("#dddResponsavel").setMask({
            mask : '(99)',
            autoTab : false
        });

It should be like (31) or (15), but when I run the project, only appears (31 or (15 ...

Andrew Lohr
  • 5,380
  • 1
  • 26
  • 38
  • 2
    I feel like your tags and description could have been a bit more specific to what you are using. `setMask` is not really something that is built-into JavaScript – apokryfos Jul 31 '18 at 14:40
  • have you tried something along the lines of `mask : '(99\)',` ? – Woohoojin Jul 31 '18 at 14:49
  • @Christian Scillitoe: Yes I've tried mask: '(99\)', and still not working. – SauloLauers Jul 31 '18 at 15:42
  • @apokryfos : – SauloLauers Jul 31 '18 at 15:46
  • What's `$` and where does `.setMask` come from? Aren't those details worth mentioning in the question? – apokryfos Jul 31 '18 at 15:48
  • $ comes from jQuery. .setMask come from jquery-meiomask lib. – SauloLauers Jul 31 '18 at 16:08
  • @SauloLauers I played around with meiomask a bit and got the same results as you, maybe its a bug with the package. Possibly consider looking at the source and fixing it and opening a PR or using a different masking library. – Andrew Lohr Jul 31 '18 at 22:49
  • It was solved using the mask at same filed for number and code area... so my mask is $("#telefoneResponsavel").setMask({ mask : '(99) 99999-9999', autoTab : false }); – SauloLauers Aug 13 '18 at 13:19

0 Answers0