nathanstitt / react-braintree-fields

React components for Braintree hosted fields
https://nathanstitt.github.io/react-braintree-fields/
MIT License
39 stars 25 forks source link

How to set expiration year dropdown values to 2-digit values? #61

Closed draganavivify closed 1 year ago

draganavivify commented 1 year ago

Hi, I need to get 22, 23, 24 instead of 2022, 2023, 2024, etc. in the dropdown for the expiration year field.

I managed to do that for the expiration month (01, instead of 1), with the select options parameter, that I found in the documentation, where I use my own array of values. This can only be used for the expiration month field, according to documentation. So for the expiration year that doesn't work, and I haven't seen some other options. Any suggestions?

nathanstitt commented 1 year ago

Hi @draganavivify I'm sorry but I don't see how to do that with the Braintree api as it's documented. if you do manage to get it working using their api I'd be interested in seeing an example so I could do so as well