How to enter any number in a number field with a step value?

Avatar

Avatar

vigiaemnewbie

Avatar

vigiaemnewbie

vigiaemnewbie

10-04-2019

I have the following number field with the given properties:

1730177_pastedImage_0.png

The dialog is throwing an error asking me to enter values only in multiples of 500. I am following the granite ui documentation and entering the step value as a string. Still I am not able to enter any value. Is this a bug or have I given the wrong properties?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

cprogramkarthic

Avatar

cprogramkarthic

cprogramkarthic

11-04-2019

If the step property is used in number field, then it will allow only the multiples of the given step values within the min and max range. In this case only 3000, 3500, 4000,....,15000 will be accepted. If any value needs to be accepted in the number field then the step property should not be used.

Answers (4)

Answers (4)

Avatar

Avatar

vigiaemnewbie

Avatar

vigiaemnewbie

vigiaemnewbie

11-04-2019

The documentation link I have provided mentions two options under the "step" property wherein we can restrict the values to multiples of the step value OR also enable author to enter any value. Is it not possible to allow a step increment at the same time enter any value in the field manually?

1731449_pastedImage_1.png

Avatar

Avatar

vigiaemnewbie

Avatar

vigiaemnewbie

vigiaemnewbie

10-04-2019

I do need the step value but at the same time author should be able to enter any value. I have referred to this documentation: NumberField — Granite UI 1.0 documentation

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

10-04-2019

Agree with Jaideep's response. Please check the NumberField reference documentation.

Avatar

Avatar

jbrar

Employee

Avatar

jbrar

Employee

jbrar
Employee

10-04-2019

I believe that is due to the "Step" property added to the node. Try to remove the step property and try again. For more details refer to the documentation below:

NumberField — Granite UI 1.0 documentation