Skip to content

Mask autoloading#34

Closed
luads wants to merge 1 commit intoplentz:masterfrom
luads:master
Closed

Mask autoloading#34
luads wants to merge 1 commit intoplentz:masterfrom
luads:master

Conversation

@luads
Copy link

@luads luads commented Feb 10, 2012

I've created a setting that auto-load the mask on the fields in case the default value of the input is not in the mask's format.

$(':text.money').maskMoney({
    thousands:'.', decimal:',', defaultZero: false, autoLoad: true
});

After I made this change I realized that i could call also .maskMoney().mask() too :)

@pbalduino
Copy link
Contributor

Feedback:

Hey dude, thanks for the fix and sorry for the lack of feedback.

I'm busy here with a monster project deadline and didn't verify what you did, but please don't feel you're alone or that we didn't give a penny for your effort.

Again, thanks. I'll try to look at your code ASAP.

@ghost ghost assigned pbalduino Mar 1, 2012
@goenning
Copy link

.maskMoney().mask() didn't work for me, but I've added this "autoLoad" settings and it worked perfectly.
thank you for the share, that was exactly what I was looking for.

luiscoms pushed a commit to luiscoms/jquery-maskmoney that referenced this pull request Apr 12, 2012
@milushov
Copy link

nice

@milushov
Copy link

milushov commented May 7, 2013

@plentz, why do you not integrate this feature? I think this feature is must have.

@plentz
Copy link
Owner

plentz commented May 26, 2013

@oenning you probably is using some older version of maskMoney(sorry for taking so long to reply)

@plentz
Copy link
Owner

plentz commented May 26, 2013

@milushov because .maskMoney().maskMoney('mask') should have the exact same behavior. If some of you guys have problems using this approach(.maskMoney().maskMoney('mask')), please, open an bug with the steps to reproduce the problem.

@Hisamu thanks for the pull request, but as you find out, .maskMoney().maskMoney('mask') it's a good solution for that and it's already in the code :) anyway, if you want this merged, I think that autoLoad name is a little misleading(to me it sounds like it makes maskMoney to watch $(':text.money') and "auto binds" to new elements that matches it). Someone have a better suggestion for the name of the parameter?

@plentz
Copy link
Owner

plentz commented Dec 26, 2013

closing for now. If someone thinks it should have some attention, please, read the messages above and explain your point :)

@plentz
Copy link
Owner

plentz commented Jan 17, 2014

hey guys, just a quick heads up: I was saying .maskMoney().mask(), but what I really mean was .maskMoney().maskMoney('mask')

@fer-ri
Copy link

fer-ri commented Nov 13, 2015

@plentz Thanks, works for me 👍

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Comments