Page 1 of 1

Min and Max

PostPosted: 16 Sep 2014 10:00
by mjq
Hello!

Because I wanted to restrict the numerical value input dynamically,
I put IWCGJQSpinEdit at my app's MainForm and set Min and Max properties of JQSpinOptions
by program code.

If these values were different, then worked expectedly.
But if same, the SpinEdit were able to change to less than Min value.

For example,
if Min was 1 and Max was 10, SpinEdit couldn't change by the button
to less than 1 or more than 10.
But when both Min and Max equal 11, could change less than 11.

What do you think this?

Best Regards.

Re: Min and Max

PostPosted: 16 Sep 2014 12:07
by Jorge Sousa
Hello

Ok, we will take a look

#Ticket:SRC00040364

Re: Min and Max

PostPosted: 17 Sep 2014 11:10
by Alexander Bulei
Hi,

Fixed in v2.3.0.44:

Code: Select all
IWCGJQSpinEdit:
- Fixed: issue with Max & Min properties in jquery plugin, when they are changed in ajax
- Fixed: json generation of Max & Min properties


Thanks.

Best Regards.

Re: Min and Max

PostPosted: 18 Sep 2014 01:34
by mjq
Thank you for immediate action.
I confirm it soon after released that version.

Re: Min and Max

PostPosted: 18 Sep 2014 10:07
by Jorge Sousa
That version: 2.3.0.44, was released a few minutes ago

Re: Min and Max

PostPosted: 19 Sep 2014 02:41
by mjq
Hi,

Now I reinstalled V2.3.0.44 and confirmed updates.

But unfortunately the "Min" constraint did not function yet.

SpinEdit could still change to less than "Min"...


BTW, what I want to do is that changing the range of input
in the case of Inserting, and the case of Updating.

So I assigned "BeforeInsert" event of the Query, like:

delphi code
procedure TMyFrame.Query1BeforeInsert(DataSet: TDataSet);
begin
//this is for exapmle.
//actually '11' is changed case by case...
JQSpinEdit1.JQSpinOptions.Min := 11;
JQSpinEdit1.JQSpinOptions.Max := 11;
end;

and I executed it, then SpinEdit was able to change less than 11
even if this event passed.

Re: Min and Max

PostPosted: 19 Sep 2014 09:37
by Alexander Bulei
Hi mjq,

Can you send us the simple testcase? t.i.a

Best Regards.

Re: Min and Max

PostPosted: 22 Sep 2014 03:35
by mjq
Hi,

Now I reinstalled not V2.3.0.44 but V2.3.0.46,
then my app worked as I intended.

Thank you for your support.