Skip to content

Commit 6ddb468

Browse files
committed
Allow using '.' to insert non standard decimal separator.
When using a non standard decimal separator, such as comma ',' allow the user to insert it using the '.' key.
1 parent 3b0e565 commit 6ddb468

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: numeric/jquery.numeric.js

+4
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ $.fn.numeric.keypress = function(e)
143143
allow = false;
144144
}
145145
}
146+
//if the key pressed is '.' and the decimal symbol is not present yet, add it to the field.
147+
else if(key == 46 && $.inArray(decimal, value.split('')) == -1){
148+
this.value += decimal;
149+
}
146150
}
147151
else
148152
{

0 commit comments

Comments
 (0)