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

Error globalization NumericTextBox de-DE (Decimal != .)

1 Answer 112 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Martin Gleiß
Top achievements
Rank 1
Martin Gleiß asked on 03 Jun 2013, 01:27 PM
At the kendo version v2013.1.514, the NumericTextBox has an error in language de-DE.

You can test it at http://demos.kendoui.com/web/globalization/index.html

1. Change culture de-DE
2. Set "Initial price" to "10,5"
3. Focusout textbox, value change to "10,50 €"
4. Focus textbox, value change to "11.5" (problem is the point)
5. Focusout textbox, value change to "105,00 €"

I have change the NumericTextBox.prototype._update and it works... Have you a better idea?

(function () {
    NULL = null;
    round = kendo._round;
    window.kendo.ui.NumericTextBox.prototype._update = function (value) {
        var that = this,
            options = that.options,
            format = options.format,
            decimals = options.decimals,
            culture = that._culture(),
            numberFormat = that._format(format, culture),
            isNotNull;

        if (decimals === NULL) {
            decimals = numberFormat.decimals;
        }

        value = that._parse(value, culture);

        isNotNull = value !== NULL;

        if (isNotNull) {
            value = parseFloat(round(value, decimals));
        }

        that._value = value = that._adjust(value);
        that._placeholder(kendo.toString(value, format, culture));

        if (isNotNull) {
            value = value.toString();
            if (value.indexOf("e") !== -1) {
                value = round(+value, decimals);
            }
        } else {
            value = "";
        }

        that.element.val(kendo.toString(parseFloat(value), format, culture)).attr("aria-valuenow", value);
    }
})()

Thanks

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 03 Jun 2013, 03:13 PM
Hello Martin,

 
This is a known issue, which is already addressed. Check this link for more information.

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
Martin Gleiß
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or