I had a similar requirement lately, and the only thing I could find was that I didn’t require me to work hard on setting up the plugin, it was to use this modified date masking plugin based on what you mentioned . He seems to be doing this job so far.
If you want to check it out, go to this page .
The main implementation that we used with this modified date timer is as follows:
$('#yourInputBoxHere').mask("99/99/9999", {placeholder: 'MM/DD/YYYY' });
I have not tried it with single digits for dates, but if I did, I would just change the expression above:
$('#yourInputBoxHere').mask("9/9/9999", {placeholder: 'M/D/YYYY' });
Hope this helps.
source
share