diff --git a/src/DonationForms/resources/registrars/templates/fields/Amount/CustomAmount.tsx b/src/DonationForms/resources/registrars/templates/fields/Amount/CustomAmount.tsx index 1341222877..e0cb0b147c 100644 --- a/src/DonationForms/resources/registrars/templates/fields/Amount/CustomAmount.tsx +++ b/src/DonationForms/resources/registrars/templates/fields/Amount/CustomAmount.tsx @@ -15,12 +15,17 @@ type CustomAmountProps = { onValueChange?: (value: string, name?: string, values?: CurrencyInputOnChangeValues) => void; }; +const formatter = new Intl.NumberFormat(navigator.language); +const groupSeparator = formatter.format(1000).replace(/[0-9]/g, ''); +const decimalSeparator = formatter.format(1.1).replace(/[0-9]/g, ''); + /** * @since 3.0.0 */ const CustomAmount = ( {defaultValue, fieldError, currency, value, onValueChange}: CustomAmountProps ) => { + return (
onValueChange(value !== undefined ? value : '')} + onValueChange={(value) => {onValueChange(value !== undefined ? value : '')}} />
);