-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow no decimals #165
base: master
Are you sure you want to change the base?
Allow no decimals #165
Conversation
btw amazed that this feature is 2 years late =) thanks for the plugin. |
Ah... unmasked fails, because it depends on specific number of segments in the string. ( I think you mentioned this in another pull request I spotted). Troublesome. Without knowing which decimal indicator is being used in the unmasked method, this becomes difficult. Will mull. Edit: ahh... unmasked doesn't even require the field to be initialised, so even if I did depend on data attributes, it may not even be there... can we make this a, you know, requirement? What use case would we have to call maskMoney on a field that isn't initialised? (and I ask this because all the tests in unmasked_test.js do not initialise maskMoney) |
Fix unmasked Fix doco Fix jshint Oops, return number not string. Tweak the test by initialising accordingly.
There's a couple options here, but I think the easiest to merge and On 3/11/15 5:09 AM, Daryl Teo wrote:
|
I did not know that! You leant something new everyday. Yes I agree if jQuery data doesn't put the attribute on the element the This doesn't solve the question of whether unmasked method can be called on On Thursday, March 12, 2015, Graham Bass [email protected] wrote:
|
Anything new on this? |
In reference to #82.
This feature turned up in one of my client work today, so I figured I'd try to implement it myself (spare time, unsponsored :( )
This patch introduces the allowNoDecimal property (false by default).
By turning it on the follow semantics apply:
Both the precision and the decimal properties influences this behaviour (so if decimal is changed to ",", the "," key must be used to start decimals).
I hope these semantics make sense, as I will be using these in my client project.
I have also updated the Readme, the demo html, as well as introduced 4 new tests for testing this behaviour. Unfortunately I could not get "." and cursor keypresses to work in the test :( if you let me know how to get them to work, I'll add more tests.
Kind Regards,
Daryl