ce icon indicating copy to clipboard operation
ce copied to clipboard

input mask decimal setting problem

Open TsePakKwan opened this issue 7 years ago • 5 comments

hi @paulhodel relate #607

Try to add quotes on the data.

Best regards,

thank you, 'add quotes on the data' can fixed problem on numeric column. However, I have find other problem relate this case,when I use input mask 'decimal' setting will cause below problem.

  1. if the cell value is negative values, it removes the negative sign. And formula column will show wrong result. when I double click the cell talent to display the value with negative sign. please refer below jsfiddle https://jsfiddle.net/tsepakkwan/z5dqhLwm/ 03

  2. formulas column still do not show zero value on cell. please refer below jsfiddle https://jsfiddle.net/tsepakkwan/7vgnzo5p/ 01

And also when I remove below input mask decimal setting, then will normally show the zero value. 02

TsePakKwan avatar Sep 27 '19 00:09 TsePakKwan

This will be fixed soon.

pphod avatar Sep 30 '19 19:09 pphod

i was also facing the same negative sign issue when using masking

below is the solution i have implemented

in the run of mask function which is in jsuites.js obj.run = function (value, mask, decimal) {

add below code block

if (value + valueDecimal < 0)
  values.unshift('-');

before below code return values.join('');

or

//add negative sign if value less then zero
                var sign = (value + valueDecimal < 0) ? -1 : 1;
                return sign * values.join('');

image

NomanChali avatar Oct 01 '19 15:10 NomanChali

This has been fixed. The mask should include: [-] as a signal number. More information https://bossanova.uk/jsuites

pphod avatar Nov 04 '19 18:11 pphod

This has been fixed. The mask should include: [-] as a signal number. More information https://bossanova.uk/jsuites

hi @paulhodel

could you please create a jsfiddle example for fix my problem? I try to include: [-] as a signal number as below jsfiddle. But I can't see any problem fixed. https://jsfiddle.net/tsepakkwan/z5dqhLwm/6/

TsePakKwan avatar Nov 06 '19 00:11 TsePakKwan

I already read https://bossanova.uk/jsuites If my understanding is correct, This setting only turn all cells into negative numbers, not read data and if data is negative numbers to give a negative sign. but this cannot fix this issue, It is because no one knows whether the user entered a positive or negative number.

TsePakKwan avatar Nov 06 '19 00:11 TsePakKwan