unmask #8

Closed
hariharans87 opened this Issue May 12, 2011 · 12 comments

Projects

None yet

4 participants

@hariharans87

How to unmask?

example for mask:
$("#date").inputmask("m/d/y");

unmask?
$("#date").unmask();

Thanks,
Hari

@RobinHerbots
Owner

with the autounmaskoption you can change the return of $.fn.val to
unmaskedvalue or the maskedvalue

$(document).ready(function(){
$("#date").inputmask("m/d/y", {'autoUnmask' : true}); // value:
03/23/1973

$("#date").val();    // 03231973     (autounmask: true)

});

or you can use

$("#date").inputmask('unmaskedvalue');

regards,

Robin

2011/5/12 hariharans87 <
reply@reply.github.com>

How to unmask?

example for mask:
$("#date").inputmask("m/d/y");

unmask?
$("#date").unmask();

Thanks,
Hari

Reply to this email directly or view it on GitHub:
#8

@hariharans87

Hi Robin,
I don't want unmasked value. I just want to remove the mask from the control not value.

Thanks,
Hari

@RobinHerbots
Owner

Why would you want to do that?

2011/5/12 hariharans87 <
reply@reply.github.com>

Hi Robin,
I don't want unmasked value. I just want to remove the mask from the
control not value.

Thanks,
Hari

Reply to this email directly or view it on GitHub:
#8 (comment)

@hariharans87

Hi Robin,
i select united states then mask will work like (123) 355-1234. but i select india or other country then i want to unmask it will look like 1233551234. The textbox mask will be unmask.

Thanks,
Hari

@RobinHerbots
Owner

Ha ok, ... shall I add a remove option?

2011/5/12 hariharans87 <
reply@reply.github.com>

Hi Robin,
i select united states then mask will work like (123) 355-1234. but i
select india or other country then i want to unmask it will look like
"3123553997". The textbox mask will be unmask.

Thanks,
Hari

Reply to this email directly or view it on GitHub:
#8 (comment)

@hariharans87

Hi Robin,
yes, please add remove option (unmask function)

Thanks,
Hari

@hariharans87 hariharans87 reopened this May 12, 2011
@hariharans87

Hi Robin,
Could you send the code?

Thanks,
Hari

@RobinHerbots
Owner

Check out the latest version

usage

$('#date').inputmask('remove');

@hariharans87

Hi Robin,
Great. Thank you very much. Now it is working fine. I must suggest your codes to my friends. I am following your code.

Thanks,
Hari

@Jaspal
Jaspal commented May 8, 2012

Hi Robin,

I want put mask onfocus and onblur display normal text unmask

Here is my code but it's not working i also tried $('#txtSSN').inputmask('remove'); on blur but this is not working on chrome. can you please suggest me ASAP
(function($) {
$(document).ready(function() {

            $('.ssn').focus(function() {
                //alert('in');
                $(this).inputmask('ssnMasked');


            }).blur(function() {

            $('#txtSSN').inputmask('unmaskedvalue');


            });
        });
    })($);
@anksce
anksce commented Feb 4, 2014

I tried this $('.decimal').inputmask('remove') but it simply unbinds the inputmask however the value is not getting unmaksed and replaced in textbox.

Please help

@RobinHerbots
Owner

@anksce ,

See #412

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment