We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c8f4bb commit fa33e0eCopy full SHA for fa33e0e
1 file changed
src/components/AddPaymentCard/PaymentCardForm.tsx
@@ -144,6 +144,8 @@ function PaymentCardForm({
144
145
const previousValueRef = useRef<string>('');
146
147
+// Formats user input into a valid expiration date (MM/YY) and automatically adds slash after the month.
148
+// Ensures the month is always between 01 and 12 by correcting invalid value to match the proper format.
149
const onChangeExpirationDate = useCallback((newValue: string) => {
150
if (typeof newValue !== 'string') {
151
return;
0 commit comments