Login Register

decimal

NumberSpinner with fractional smallDelta?

This is probably more of a feature request than anything else, but maybe someone has seen an easy way to do this:

I want the NumberSpinner to support decimals to 2 places to the right of the decimal point, thus:

0.01

The arrow buttons would then increment/decrement by 0.01. I was hoping I could achieve this with

constraints="{max:100,min:0,places:2,smallDelta:0.01}"

But this does not appear to work. Any suggestions would be appreciated. Thanks.

decimal number cannot have more then 3 digits after the decimal point

Hi All,

I'm using dijit.form.NumberTextBox to input numbers, and it seems that even though I set the constraints.places to be undefined, entering a number that has more then 3 digits after the decimal point results in an error message. I did some digging and found out that since I have an en-us local, the decimal number pattern (found at dojo/cldr/nls/en-us/Number.js) defines that no more then 3 digits are allowed after the decimal point.
Is there a way to override this limitation, I prefer not to set the pattern as I don't want to limit the number of digits after the decimal point.

Syndicate content