Is there a way to hide placeholder hyphens and only show them when the characters are entered?
hexerus opened this issue · 2 comments
hexerus commented
Using the placeholder option:
<script> $('#phone').inputmask('999-99-9', {'placeholder': ''}); </script>
has disabled the underscore placeholders, but not the dashes.
Image 1 (field not in focus, correct):
Image 2 (field in mouse focus, these are the dashes I want to hide):
Image 3 (only show them when the characters are entered up to that point in green, not show the one in red):
- OS: Windows 11
- Browser: Chrome 124
- Inputmask version: 5.0.10
Techn1c4l commented
Use showMaskOnFocus
, showMaskOnHover
and jitMasking
options like this:
$(function() {
$('#myInput').inputmask('999-99-9',
{
placeholder: '',
showMaskOnFocus: false,
showMaskOnHover: false,
jitMasking: true
});
});
hexerus commented
jitMasking: true
appears to works alone on itself, thanks.