diff --git a/dictation_client/src/pages/LicensePage/cardLicenseIssuePopup.tsx b/dictation_client/src/pages/LicensePage/cardLicenseIssuePopup.tsx index 6b972f6..e700d01 100644 --- a/dictation_client/src/pages/LicensePage/cardLicenseIssuePopup.tsx +++ b/dictation_client/src/pages/LicensePage/cardLicenseIssuePopup.tsx @@ -107,7 +107,9 @@ export const CardLicenseIssuePopup: React.FC = ( step={1} className={styles.formInput} onChange={(e) => { - const input = Number(e.target.value.substring(0, 4)); + const input = Number( + e.target.value.replace(/[-.]/g, "").substring(0, 4) + ); setCount(input); }} onBlur={(e) => { diff --git a/dictation_client/src/pages/LicensePage/licenseOrderPopup.tsx b/dictation_client/src/pages/LicensePage/licenseOrderPopup.tsx index 2590176..8d46a79 100644 --- a/dictation_client/src/pages/LicensePage/licenseOrderPopup.tsx +++ b/dictation_client/src/pages/LicensePage/licenseOrderPopup.tsx @@ -177,7 +177,9 @@ export const LicenseOrderPopup: React.FC = (props) => { maxLength={4} className={styles.formInput} onChange={(e) => { - const input = Number(e.target.value.substring(0, 4)); + const input = Number( + e.target.value.replace(/[-.]/g, "").substring(0, 4) + ); setCount(input); }} onBlur={(e) => {