Copy Paste a special character is accepting in Numeric Textbox

2 posts, 0 answers
  1. Pathrudu
    Pathrudu avatar
    4 posts
    Member since:
    Jun 2013

    Posted 08 Aug 2013 Link to this post

    Trying to Copy Paste date format(01/01/2013) is accepting in numeric text box. after moving out of that control it is displaying (01012013). But when i moving out of the control, i need to display a warning message, please enter valid numeric values instead of removing special character.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Aug 2013 Link to this post

    Hi Pathrudu,

    Please check the following code snippet which  restrict user from entering special character in the  RadNumericTextBox.

    <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" ClientEvents-OnValueChanging="OnValueChanging">

    <script type="text/javascript">
        function OnValueChanging(sender, args) {
            var numerictxtbox = document.getElementById('<%=RadNumericTextBox1.ClientID %>');
            var txtboxvalue = numerictxtbox.value;
            if (!txtboxvalue.match("^[0-9]+$")) {
                alert("Please enter valid input!");

  3. DevCraft R3 2016 release webinar banner
Back to Top