Jquery: Mask does not turn off

0

I can not type anything inside a textbox field that I put a date mask on, it will not let me delete or type it over, it always stays 11/11/1111

Here are the codes I put:

Everything I'm importing:

    <script src="~/Scripts/jquery-1.10.2.js" type="text/javascript"></script>
<script src="~/Scripts/JavascriptInsano.js" type="text/javascript"></script>
<script src="~/Scripts/jquery.maskedinput.js" type="text/javascript"></script>
<script src="~/Scripts/funcao_validate_data.js" type="text/javascript"></script>

On this page you have Input:

<div class="form-group">
    @Html.LabelFor(m => m.DataInicio, "Data de Início", new { @class = "col-md-2 control-label" })
    <div class="col-md-10">
        @Html.TextBoxFor(m => m.DataInicio, new { @class = "form-control" })
    </div>
</div>

Now follows the javascript that does with the function:

jQuery(function($){
    $("#DataInicio").mask("11/11/1111",{placeholder:" "});
});

jQuery(function ($) {
    $("#DataTermino").mask("11/11/1111");
}); 
    
asked by anonymous 16.07.2015 / 17:21

1 answer

1

The mask string must be in the following format, in case it is a number you should use the number 9 as a representation, your error is in using the number 1.

$("#DataTermino").mask('99/99/9999');
    
16.07.2015 / 17:36