Remove mask but keep Values on submit? #58

Closed
iwednesday opened this Issue Oct 21, 2011 · 2 comments

Comments

Projects
None yet
4 participants

is it possible to remove masks but keep values on submit?

I'm looking for the same thing. I found this answer: http://stackoverflow.com/questions/7854651/remove-literals-from-input-mask-after-form-submit But I haven't been able to get it working in my rails app. Suggestions please.

Contributor

FagnerMartinsBrack commented Mar 17, 2012

just use the .mask(), it returns the raw value:

$("input").val("10/10/2010").mask("99/99/9999").mask(); //10102010

There's a little bug when there's no element when calling .mask() (it is returning a jQuery object), but if u check my fork you'll see a correction.

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