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

NumericTextBox with ASP MVC Wrapper and Microsoft Edge

1 Answer 118 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Netapsys
Top achievements
Rank 1
Netapsys asked on 12 Oct 2015, 04:37 PM

I'm using KendoUI with Microsoft Edge and I have some problems with ASP MVC Wrapper and NumericTextBox when I use French culture :
My server culture is set to "fr-FR", so all Html.TextBoxFor and Html.Kendo().CurrencyTextBox() render numeric values with "," instead of "."

http://dojo.telerik.com/AfUCU/4

<input type="number" value="42,02" id="test" name="test" />
<script>
    kendo.culture("fr-FR");
    $("#test").kendoNumericTextBox({"format":"c"});
</script>

Original razor code :
@Html.Kendo().CurrencyTextBox().Name("test").Value((decimal?)42.02d)

With Chrome, IE11, Firefox => Display = 42,02
With Microsoft Edge => Display nothing : Input is Blank

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 14 Oct 2015, 09:30 AM
Hello Netapsys,

The described behavior is a known issue related to MS Edge. The MVC wrapper for NumericTextBox renders an input element with type="number", which is done for graceful degradation purposes. This, however, does not work in Edge, because it ignores any value that is not valid "en-US" number.

If you do not want to upgrade, then you can just render the input element type="text". Thus the browser will not ignore the value and the widget will be able to work as expected:
@Html.Kendo().CurrencyTextBox().Name("test").HtmlAttributes(new { type = "text" }).Value((decimal?)42.02d)

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
NumericTextBox
Asked by
Netapsys
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or