Page 1 of 1

Float numbers in edit

PostPosted: 20 Nov 2014 09:27
by Soren SDF
Hi,

When i set EditType to jqmetNumber and type a "," for decimalseparator the Value and Text properties return 0.
It works as expected when i use ".". How do I change the decimalseparator?
In my servercontrollers NewSession event i have this code

DateSeparator:=FSettings.DateSeparator;
ShortDateFormat:=FSettings.ShortDateFormat;
DecimalSeparator:=FSettings.DecimalSeparator;
CurrencyString:=FSettings.CurrencyString;
CurrencyFormat:=FSettings.CurrencyFormat;
LongTimeFormat:=FSettings.LongTimeFormat;

which seems to work fine apart from in JQMEdit.

T.I.A.
Sören A.

Re: Float numbers in edit

PostPosted: 20 Nov 2014 11:14
by Alexander Bulei
Hi Soren,

Checked and works as expected with both decimal palces ("." and ",")

Do you have defined the Max/Min properties?

Best Regards.

Re: Float numbers in edit

PostPosted: 20 Nov 2014 11:51
by Soren SDF
Only the default values.
Could you perhaps send me some demo code?

Sören A

Re: Float numbers in edit

PostPosted: 20 Nov 2014 15:32
by Alexander Bulei
Hi Soren SDF,

Tested with standard usage of component.

delphi code
procedure TIWAppForm6.IWCGJQMButton1JQMButtonOptionsEventsVClick(Sender: TObject; AParams: TStringList);
begin
WebApplication.ShowMessage(FloatToStr(IWCGJQMEdit1.JQMEditOptions.NumberOptions.Value));
end;


In which browser it happens?

Best Regards.

Re: Float numbers in edit

PostPosted: 20 Nov 2014 15:47
by Alexander Bulei
Hi Soren SDF,

Ok, I detected this behavior only on IE.

Fixed in next beta version.

Best Regards.

Re: Float numbers in edit

PostPosted: 20 Nov 2014 16:14
by Soren SDF
Hi again.

I put your code snippet in my code and tested all ny installed browsers with the following result:

Browser Typed value Value in showmessage
IE 11 2,5 0
IE 11 2.5 2,5
Firefox 2,5 0
Firefox 2.5 2,5
Chrome 2,5 2,5
Chrome 2.5 2,5
Safari 2,5 2
Safari 2.5 2,5
Opera 2,5 2,5
Opera 2.5 2,5

Sören A

Re: Float numbers in edit

PostPosted: 20 Nov 2014 16:17
by Alexander Bulei
Hi Soren SDF,

I have latest FireFox and I doesn't have this behavior.
Btw, fixed.

Best Regards.

Re: Float numbers in edit

PostPosted: 21 Nov 2014 09:55
by Soren SDF
Great. Looking forward to the update.

Thx
Sören A