Input Mask

There are few options on how to include/import Input Mask into your project:

Install from NPM

Install the required libraries using the command below:

npm install cleave.js --save

Add the prism js file link.

<script src="assets/libs/cleave.js/cleave.min.js"></script>

To apply alpine mask add the below code in the init.js file.

HTML

<input type="text" class="form-control" id="simple-date" name="simple-date" placeholder="MM/DD/YYYY" />

Javascript

new Cleave('#simple-date', {
    date: true,
    delimter: '/',
    datePattern: ['d', 'm', 'Y']
});