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

2 posts, 0 answers
  1. Martin Gleiß
    Martin Gleiß avatar
    6 posts
    Member since:
    Jun 2009

    Posted 03 Jun 2013 Link to this post

    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
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 03 Jun 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top