Skip to content
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

Negative #s becomes Positive #124

Open
ghost opened this issue Jan 8, 2017 · 2 comments
Open

Negative #s becomes Positive #124

ghost opened this issue Jan 8, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 8, 2017

This is my code below:

$('#span').text('-123.00');
$('#span').number(true,2);

//output is 123.00 <- the negative sign is gone.

thanks,

@Marsovski
Copy link

+1

@rwx666888
Copy link

you cant try :
version 2.1.5 or 2.1.6
line:581
change
var $this = $(this), num = +$this.text().replace(regex_dec_num,'').replace(regex_dec,'.');
TO
var $this = $(this), num = +$this.text().replace(new RegExp('[^'+u_dec+'0-9-]','g'),'').replace(regex_dec,'.');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants