react-input-mask icon indicating copy to clipboard operation
react-input-mask copied to clipboard

Multiple masks

Open justindra opened this issue 9 years ago • 14 comments

Hi,

Is it possible to have different characters for the mask in one input?

For example dd/mm/yyyy instead of__//__.

justindra avatar Jul 22 '16 03:07 justindra

@justindra Did i understand you correctly?

You mean this: screen shot 2016-07-23 at 10 31 35

Instead of this: screen shot 2016-07-23 at 10 31 48

And instead of this (placeholder on unfocused empty input): screen shot 2016-07-23 at 10 32 06

sanniassin avatar Jul 23 '16 07:07 sanniassin

@sanniassin yep that's correct! :)

justindra avatar Jul 23 '16 12:07 justindra

Are there any ways to set multiple masks on input like ['+11 11111111', '+11 1111111111'] ?

olejka91 avatar Dec 13 '17 13:12 olejka91

@sanniassin Here in Brazil it is very common to have 8 or 9-digit phones, for example: 3004-1212 (home phone) and 98767-9876 (Mobile Phone)

It would be interesting if the component accepts more than one mask or optional masks. Something like this jQuery plugin:

https://github.com/RobinHerbots/Inputmask#optional-masks

dersonsena avatar Aug 14 '18 14:08 dersonsena

@sanniassin Do you think it's possible to get this kind of behavior to work using beforeMaskedValueChange? I need to port some code that relies on jQuery maskedinput over to React; this seems like it's the trickiest part.

jdpopkin avatar Dec 12 '18 17:12 jdpopkin

@sanniassin so, is this possible?

ivanfilhoz avatar Oct 21 '19 18:10 ivanfilhoz

nothing new here?

ncesar avatar Apr 02 '20 00:04 ncesar

possible?

julien9999 avatar Apr 28 '20 04:04 julien9999

Bump. I also need this. Any news?

StevenVerbiest avatar Oct 14 '20 13:10 StevenVerbiest

Bump. Any other solution?

Capati avatar Oct 19 '20 19:10 Capati

👀

3runoDesign avatar Nov 04 '20 12:11 3runoDesign

Any update on this?

JimmyBastos avatar Jan 05 '21 13:01 JimmyBastos

I will reference issue #190 that is the same issue and could be help all here.

JulyanoF avatar Feb 19 '21 20:02 JulyanoF

👀