-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I'm using ZK 5.09 CE and i have this problem with a decimalbox control. I write this 1,050.12 but when I use getValue from control (decimalbox) it becomes 1.05012. How can i solve this? thanx.
Your browser language is probably setup to some region where comma (",") is the decimal point.
In my area, this input is unusual but according to the spec it makes sense.
If you have tomcat, you can check your locale using
<label value="${desktop.execution.nativeRequest.locale}" />
I have just download version 5.0.11 and I test decimalbox, I work in locale spanish and when I enter a 23.3 and when "onBlur" the number change to 233
In fact page zkdemo (http://www.zkoss.org/zkdemo/input/form_sample) I detected the same problem in decimalbox
I don't see your point. In Spanish, "." is a grouping character (usually for thousands).
In other words, it has no meaning for the number. Thus, the result "233" is correct.
What you can do to limit the confusion is to disable the grouping character for decimal box with a global or local setting.
Then you can only enter the decimal point character, in your case ",".
Asked: 2011-12-29 00:49:41 +0800
Seen: 269 times
Last updated: Apr 16 '12