I have a RadNumericTextBox set to Type="Percent". I want the user to be able to enter numbers 0 - 100 with one decimal place. "100.0" is 5 characters so I set the MaxLength to 5. The code is below:
This works as expected in IE8 and Firefox4. But in Chrome 10 it does not work. When I click the button the focus goes to the text box because an error is detected in the input even if the number of characters entered is less than 5. If I increase the MaxLength to 20 it works in Chrome. It seems that Chrome is applying the MaxLength value to the formatted value ("2.00 %"), but IE and Firefox apply the MaxLength to the characters that the user enters. Is there a workaround for this problem?
I am using Telerik 2010 Q2.
<
telerik:RadNumericTextBox
ID
=
"textInput"
Type
=
"Percent"
MaxLength
=
"5"
runat
=
"server"
/>
<
asp:Button
ID
=
"buttonUpdate"
Text
=
"Calculate"
OnClick
=
"ButtonUpdate_Click"
runat
=
"server"
/>
This works as expected in IE8 and Firefox4. But in Chrome 10 it does not work. When I click the button the focus goes to the text box because an error is detected in the input even if the number of characters entered is less than 5. If I increase the MaxLength to 20 it works in Chrome. It seems that Chrome is applying the MaxLength value to the formatted value ("2.00 %"), but IE and Firefox apply the MaxLength to the characters that the user enters. Is there a workaround for this problem?
I am using Telerik 2010 Q2.