-
Notifications
You must be signed in to change notification settings - Fork 417
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
Incorrect separators #143
Comments
Adam, autoNumeric is designed to take the first period '.' or comma ',' and 12875.19 => 12875.19 OK Is this occurring on page load, page re-load or with the 'set' method? Can you duplicate this on jsFiddle? Thanks, Bob On 5/14/2015 12:08 PM, Adam Roof wrote:
|
Thanks for your reply. its occurring at this line: value = value.replace(',', '.'); I am using the latest version as of yesterday. There was no error in v1.9.26 until I updated to the latest version of 1.9.36 |
Adam Is this run under ASP.net? Bob On 5/15/2015 2:48 PM, Adam Roof wrote:
|
Yes |
here is the fiddle http://jsfiddle.net/gxfLuxLL/ |
Adam The value you have shows both a decimal point and a thousand separator There are two way to approach remove the commaor change the aForm option to falsewhich will prevent the value from being let me know if your issues is resolved. Bob On 5/15/2015 3:31 PM, Adam Roof wrote:
|
Right, dollars and cents. $12,875.99 Also, I enter a value of 9,112,875.19 and get the error |
Adam, autoNumeric is used throughout the world including locales where the Regardless my documentation states the following:* Default values* The option "aForm" controls how default values are handled on page So when aForm is set to true "aForm: true" the defaults value should be When aForm is set to false "aForm: False" the defaults values should be I am open to suggestions on modifications if they are not locale Best regards, Bob On 5/15/2015 4:28 PM, Adam Roof wrote:
|
ok, I see what you are saying on the aForm. |
I am now getting the same error on the same line with percent fields. This was not an issue in 1.9.26 on another site that I am utilizing in the exact same approach. Is aForm going to be required on all future releases? This is a bug. Errors are not being completely handled and the reason for the errors are not attempted to be resolved internally. If I have to go unformatted I don't see the point in using the plugin. Don't get me wrong I LOVE what you have done with this. This is an issue across IE and Chrome, and I can recreate in jsFiddle so it is unrelated to being an "ASP.Net" issue. New error on same line as previous error: Again, I understand that 0.00 % is NOT numeric due to the percentage sign. To resolve for now, I have added the following:
This was to resolve my current issues, I realize you have other variables to handle, just letting you know what I did to have it respond like the previous version. Thanks for your time. |
Adam, Please create the fiddle in non- ASP.Net. From what I saw this is a post back issue when the original value is Regardless I will be posting a mod, hopefully tomorrow that will allow Best regards, Bob On 5/21/2015 2:57 PM, Adam Roof wrote:
|
Adam, I have a update that I would like to send to you for testing. It will require you to use html5 data attribute named data-an-default="" that has the same value as the value attribute like in the below example. <asp:TextBox runat="server" ID="someID" value="1234.56" data-an-default="1234.56"> Please send me an email address at bob{@}decorplanit.com Bob |
sorry did not show the example <asp:TextBox runat="server" ID="someID" value="1234.56" data-an-default="1234.56"/> |
you only set aForm : false |
Sql2008 datatype money: 12875.19
Expected results: 12,875.19
Options: none
Initializer: $(".jqNumeric").autoNumeric('init');
Error:
The value (12.875.19) being 'set' is not numeric and has caused a error to be thrown
No error for values without a thousands separator. Looks like it is trying to use non US currency defaults, but I've confirmed the defaults should be comma for thousands and decimal for cents. I am not displaying any currency symbols.
Source of error. I don't want to allow locale decimal to be a comma
/** allows locale decimal separator to be a comma */
if ((testValue === $this.attr('value') || testValue === $this.text()) && settings.runOnce === false) {
value = value.replace(',', '.');
}
if (!$.isNumeric(+value)) {
$.error("The value (" + value + ") being 'set' is not numeric and has caused a error to be thrown");
}
The text was updated successfully, but these errors were encountered: