0
I’m not able to type anything inside a textbox field that I put date mask, it doesn’t let me erase or type over, it always stays 11/11/1111
It follows below the codes that I put:
All I care about:
<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 the same page is the 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 follow the javascript you do with the function:
jQuery(function($){
$("#DataInicio").mask("11/11/1111",{placeholder:" "});
});
jQuery(function ($) {
$("#DataTermino").mask("11/11/1111");
});
On the site of the plugin you will better understand how it works, but I think Fernando Medeiros has already solved his problem below. http://digitalbush.com/projects/masked-input-plugin/
– Paulo Roberto