autoNumeric-2.0-BETA
last update 2013-09-11 GMT 9:00 PM
Key features:
New "unSet" method - displays the raw value of the input.
- This displays unformatted (xxxx.xx) numeric strings in the form inputs that are controlled by autoNumeric.
- autoNumeric is not "destroyed" allowing you to easily reformat the field after the form has been posted via the "reSet" option of the "set" method (see below).
- The "unSet" method will display the expanded decimal places if the "eDec" option is used.
Modified "set" method so the form inputs can easily reset after post.
- To reset the inputs $(selector).autoNumeric('set', 'reSet');
New "eDec" option - this displays expanded decimal places when the input has focus.
- Default value "eDec: null"
- eDec - value must be enclosed in quotes - example eDec: '5'
- The "eDec" value should be either "null" or greater than the normal decimal places set by the "vMin" & "vMax" values or "mDec" option.
- If the value being "set" is longer than the "eDec" value being set will be rounded.
- Currently there is no padding when the input has focus.
- Note - "eDec" will function properly with the following exception: if the "aStor = false" (the default) and the client navigates away from the page the extended value is lost and will be replaced with the non extended value!
- Note - to ensure the extended value (eDec) is retained the "aStor" option must be set to "true" see details below.
New "aStor" option - when true allows the "eDec" value to be retained via sessionStorage on compatible browsers of a session cookie in EI 6 & 7.
- Default value "aStor: false"
- Set to "aStor: true" to use session storage.
- Note - sessionStorage or session cookie is used only on fields when eDec does not equal null and is greater than mDec.
- Note - once the browser is shut down or the tab is closed all extended values held in sessionStorage or cookies are deleted.
New "rVal" option - this displays the number with decimal only when the input has focus.
- This is similar to the behavior of a spread spreadsheet
- On focusout the value is formatted again
- Also need to see if the fixes the android ceret placement issue on versions prior to android 4.0.
New support for "Lakh Crore"
- When digital grouping dGroup is set to 2
Modified the "get" method.
- automatically checks if the "eDec" option is set and returns the expanded value.
- The "getString" & "getArray" methods use the "get" method to return values.
Demonstration showing the new features:
- Focus and focusout of the inputs to see the behaviors for the different inputs.
- Change the values.
- Navigate away and return to see the values are retained and see how the "aStor" option behaves.
- Press the "unSet" and the "set" method with the "reSet" value.
- To view the "getString" and "getArray" results open the javascript console. Note "getArray" is not stringified.
Text " contenteditable" - this is on my wish list is to eventally get autoNumeric to work here - the issue is there is no reliable method to place the ceret.
1000.00