Value vue-the-mask conditional formatting

2

I'm trying to put a mask on - vue-the-mask

<the-mask 
    id="input1" 
    v-model="ch_anual" 
    type="text" 
    :mask="['###:##', '#.###:##']" 
/>

But, you're only getting the second mask if I put ###.###.###-## , ##.###.###/####-## it works

jsFiddle: link

    
asked by anonymous 27.06.2018 / 16:15

1 answer

0

This happens because you have two masks acting on the same segment, which would be 5-digit, ie in the first mask you have the mask acting on the 5 character by applying ### - ## and at the same time you have the other mask acting by applying #. ### - #

It may seem confusing but this component acts on the control characters in this case 2 two acting on the 5 character.

    
02.08.2018 / 21:52