Glancing through the source, it looks like loading the date extensions should allow me to use a mask like mm/dd/yyyy
.
Expected behavior: clicking into the field should allow me to enter something like 12/25/2018
, replacing the mask with my input as I type.
Actual behavior: clicking into the field populates the field with the mask, but places my cursor at the end and does not allow me to type.
Inputmask().mask("input");
<script src="https://unpkg.com/inputmask@4.0.4/dist/inputmask/dependencyLibs/inputmask.dependencyLib.js"></script>
<script src="https://unpkg.com/inputmask@4.0.4/dist/inputmask/inputmask.js"></script>
<script src="https://unpkg.com/inputmask@4.0.4/dist/inputmask/inputmask.date.extensions.js"></script>
<input id="input" data-inputmask="'mask': 'mm/dd/yyyy'" />
The documentation for this library is extensive, but doesn't outline an example for my specific mask. I'm reading through the source, but thought I would toss the question here for folks more familiar with this library.
(Note: I've tagged this jquery-inputmask
, which refers to this library which can now operate with or without jQuery.)