@tap-payments/auth-jsconnect 2.3.8-test → 2.3.9-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,6 +14,7 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { alpha, Collapse, styled } from '@mui/material';
|
|
16
16
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
17
|
+
import { getFutureDate } from '../../../../utils';
|
|
17
18
|
import Text from '../../../../components/Text';
|
|
18
19
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
19
20
|
import { entitySelector, clearError } from '../../../app/entity/entityStore';
|
|
@@ -40,6 +41,6 @@ var ExpiryDate = function (_a) {
|
|
|
40
41
|
dispatch(clearError());
|
|
41
42
|
oDateControl.field.onChange(data);
|
|
42
43
|
};
|
|
43
|
-
return (_jsx(Collapse, __assign({ in: !hide }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('business_expiry_date') }), _jsx(DatePicker, { readOnly: true, disabled: disabled, defaultValue: dateValue ? new Date(dateValue) : new Date(), dir: 'ltr', locale: 'en', onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); }, onDateChange: handleExpiryDateChange })] })) })));
|
|
44
|
+
return (_jsx(Collapse, __assign({ in: !hide }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('business_expiry_date') }), _jsx(DatePicker, { readOnly: true, disabled: disabled, maxDate: getFutureDate(), defaultValue: dateValue ? new Date(dateValue) : new Date(), dir: 'ltr', locale: 'en', onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); }, onDateChange: handleExpiryDateChange })] })) })));
|
|
44
45
|
};
|
|
45
46
|
export default ExpiryDate;
|