Question and answer is powered by AnsPress.io
I want to implement credit card expiration day input field where user can just enter the month and year and it will automatically transform to a structure like below
MM/YY
How can I do this? Please help me.
You need to add a jquery plugin in your HTML script. So add this cdn
https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.15/jquery.mask.min.js
If you have the input field id try to use this script like below
$('#your_input_field_id').mask("99/2099", {placeholder: "__/__"});