Login Register

number

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.

How to query a dojo.data Store for items within a number range

Hello,

I have been experimenting with the dojo.data.ItemFileReadStore and find this very promising. Specialy the way to query items that match a certain string like "Fo*" is great. But I fear the most obvious is missing, isnt it?

Can I query for items that are within a certain number (int or float) range? Like I would sql "select * from countries where population < 300".

Is that possible somehow? Perhaps by sorting and then cutting off after the value get smaller?

Please suggest what you would find a good practice,
thank you for your help

dT

Syndicate content