Declined
Last Updated: 16 Jan 2015 21:25 by Brock
Imported User
Created on: 02 May 2014 16:16
Category: Kendo UI for jQuery
Type: Feature Request
1
Method to get the raw value from a MaskedTextBox
With the current implementation the kendoMaskedTextBox.value() method returns the value including the mask. There should be a way to get the inner value, without the mask.
2 comments
Brock
Posted on: 16 Jan 2015 21:25
I disagree so I made that:

kendo.ui.MaskedTextBox.fn.raw = function () {
    "use strict";
    var lEmptyMask = this._emptyMask;
    var lValue = this.value();

    var i = lEmptyMask.length;
    while (i--) {
        if (lEmptyMask[i] === lValue[i]) {
            lValue = lValue.slice(0, i) + lValue.slice(i + 1);
        }
    }

    return lValue;
};
ADMIN
Telerik Admin
Posted on: 09 May 2014 12:48
Indeed when you use the value() method it will return the formatted textbox value according to the mask applied. 

However, you can apply string replace for this value to remove the special symbols (dashes, brackets, etc.) and retrieve the value as numbers only.

Due to this I'm closing this request.