This is a migrated thread and some comments may be shown as answers.

[Solved] TextBox Losing Decimal Place (When region is Arabic Qatar)

1 Answer 115 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Christopher Ronak
Top achievements
Rank 1
Christopher Ronak asked on 24 Jul 2012, 02:43 PM
Hello, the textbox does not seem to format correctly if the region is Arabic Qatar.  The currency symbol for Qatar is ر.ق.‏

The issue seems to be the way the regular expression is built for parsing values in the textbox.  In particular, the following

        builder.cat('[ |')
               .cat(that.groupSeparator)
               .catIf('|' + that.symbol, that.symbol)
               .cat(']');

The regular expression is incorrect, using [ ] indicates a range of characters.  This works great if the currency symbol is a single character, but as in the case above, if the currency symbol is multi characters then the behaviour is not as expected.  Instead, using the following 

        builder.cat('( |')
               .cat(that.groupSeparator)
               .catIf('|' + that.symbol, that.symbol)
               .cat(')');

is the correct expression to use.  We've patched our local version of telerik but it would be nice to get a hotfix or something.  

Thanks!

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 27 Jul 2012, 12:53 PM
Hello Christopher,

 
Thank you for pointing this isse and for the fix. We will add it to the next internal build of Telerik Extensions for ASP.NET MVC. As a gratitude for your involvement I have updated your Telerik points.

All the best,
Georgi Krustev
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
NumericTextBox
Asked by
Christopher Ronak
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or