jQuery Mask Plugin - Issue Report

You don't need to start from scratch..

by Aditya Sharma

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="http://igorescobar.github.io/jQuery-Mask-Plugin/js/jquery.mask.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<div class="container">
    
    <form role="form">
        
        <div class="form-group">
            <label for="date-field">Date</label>
            <input type="text" class="form-control phone_us">
        </div>
    
        
        <button type="submit" class="btn btn-default">Submit</button>
    
    </div>
    </form>
</div>

JavaScript

$( document ).ready(function() {
	jQuery('.phone_us').mask('000-000-0000');
  jQuery('.phone_us').masked('123456789');
});