timofei-iatsenko / angular-cc-library

Library to support Credit Card input masking and validation
MIT License
82 stars 71 forks source link

cc-exp autocomplete does not work on safari #82

Open hisham opened 3 years ago

hisham commented 3 years ago

On Safari, autocomplete for expiry date does not work:

<input id="cc-exp-date" type="tel" autocomplete="cc-exp" ccExp>

It appears Safari wants month and year to be in two separate input boxes - see https://stackoverflow.com/a/53501982/123254

timofei-iatsenko commented 3 years ago

Thanks for your feedback. I'm not actively working on this library now. It would be really nice to have PR to fix it.

Noitidart commented 2 years ago

How does Safari identify which one is year and which one is month? by the name? is it important to use CCExpiryMonth and CCExpiryYear as exact name?

<input type="text" name="CCExpiryMonth" id="CCExpiryMonth" value="" placeholder="MM" autocomplete="cc-exp">
<input type="text" name="CCExpiryYear" id="CCExpiryYear" value="" placeholder="YYYY" autocomplete="cc-exp"> 

Any other examples that work in safari that you can share?

What about using cc-exp-month and cc-exp-year for the "autocomplete" values?