T
T
tester2020-04-16 19:51:17
JavaScript
tester, 2020-04-16 19:51:17

How to make such a restriction on the input field?

How to make such a restriction on the input field for the card "valid until" (MM / YY)

Character input restriction:
for "MM" - the Month can only be from 01 to 12
for "YY" - the year must be at least 15

Divided by 2 input is not an option. I use jQuery-Mask-Plugin

For convenience, I posted it in Codepen

5e988b4563e75837341453.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rasschitai, 2020-04-16
@tokmaganbet

forget about this plugin, put inputmask , if you search there, there is an example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question