Closed rizkymeiputra closed 5 years ago
@rizkymeiputra I couldn't reproduce the issue. What device are you on?
If you could make a screen recording would be good.
@igorescobar Sure, here https://www.dropbox.com/s/qdhpsy9m7y6zzlf/AwesomeScreenshot-2019-8-23-1566551314251.webm?dl=0
I use Chrome Version 75.0.3770.100 (Official Build) (64-bit) run on Ubuntu 18
@rizkymeiputra Since you are pragmatically changing the input without using plugin's core methods the plugin can naturally lose the track of the previous value etc. Instead, what you can do is:
$(document).ready(function(){
$('.input-mask').mask('000.000.000', { reverse: true });
$('.input-mask').on('input', () => {
$('.unmasked').val($('.input-mask').cleanVal());
});
$('.btn-reset').click(function(){
$('.input-mask, .unmasked').val('');
});
})
Just use the native input
event you don't need the internal plugin event to do that.
Hope it heps.
@igorescobar Oh, great! It's working well! Thank you so much...
Hi, I get this error when I inputted 10000, then I press reset button, after that I try to input 10000 again but its not work, its only work when 1000 and 100000, but its also work on 10001
Here's the fiddle https://jsfiddle.net/dgtpvwy3/1/
Thanks