Pparg
@PpargAll comments
- @JlbspyderSubmitted over 1 year ago@PpargPosted over 1 year ago
Heyyy congratulations for completing the challenge and great work. You could change the date/expiration input to type text and a attribute of maxlength=2 or an input type number whith the attribute of max=12 and a condition to control the user input so the number entered is between 1 and 12.
I hope my comments helps you.
0 - @victor247kSubmitted over 1 year ago
I am not sure if i did it corectly, and I did a lot of mistakes, if you have some tricks or sugestions please tell me.
@PpargPosted over 1 year agoHi, very nice work. I can see when i click on the submit button that the expiration month adds a 0 at the beginning when i try to submit the 09 input. Try to add a condition at this part of your code, maybe a condition given the length of inputMonth.value :
inputMonth.value = parseInt(inputMonth.value) > 12 ? "12" : parseInt(inputMonth.value) < 10 ?
0${inputMonth.value}:
${inputMonth.value};
Marked as helpful1