How do I create a custom skin for a given field? The mask will be in the following format:
How do I create a custom skin for a given field? The mask will be in the following format:
Use the NuGet package jQuery.MaskedInput .
In View :
@section scripts {
<script>
$("#OrdemBancaria").mask("9999OB99999");
</script>
}
I usually use the Bundle like this:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
// Alguns JS aqui
"~/Scripts/jquery.maskedinput.js",
// Mais alguns aqui
));