Skip to content

Commit 41fe261

Browse files
authored
Merge pull request #56226 from shubham1206agra/fix-transaction-date-modal-cc
Fixed save button layout in Company card transaction start date page
2 parents 4425c81 + 2eabae8 commit 41fe261

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/pages/workspace/companyCards/assignCard/TransactionStartDateSelectorModal.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Modal from '@components/Modal';
88
import ScreenWrapper from '@components/ScreenWrapper';
99
import useLocalize from '@hooks/useLocalize';
1010
import useThemeStyles from '@hooks/useThemeStyles';
11-
import * as ValidationUtils from '@libs/ValidationUtils';
11+
import {getFieldRequiredErrors} from '@libs/ValidationUtils';
1212
import CONST from '@src/CONST';
1313
import ONYXKEYS from '@src/ONYXKEYS';
1414
import INPUT_IDS from '@src/types/form/AssignCardForm';
@@ -32,7 +32,7 @@ function TransactionStartDateSelectorModal({isVisible, date, handleSelectDate, o
3232
const {translate} = useLocalize();
3333

3434
const validate = (values: FormOnyxValues<typeof ONYXKEYS.FORMS.ASSIGN_CARD_FORM>): FormInputErrors<typeof ONYXKEYS.FORMS.ASSIGN_CARD_FORM> =>
35-
ValidationUtils.getFieldRequiredErrors(values, [INPUT_IDS.START_DATE]);
35+
getFieldRequiredErrors(values, [INPUT_IDS.START_DATE]);
3636

3737
const submit = (values: FormOnyxValues<typeof ONYXKEYS.FORMS.ASSIGN_CARD_FORM>) => {
3838
handleSelectDate(values[INPUT_IDS.START_DATE]);
@@ -51,7 +51,6 @@ function TransactionStartDateSelectorModal({isVisible, date, handleSelectDate, o
5151
<ScreenWrapper
5252
style={styles.pb0}
5353
includePaddingTop={false}
54-
includeSafeAreaPaddingBottom={false}
5554
testID={TransactionStartDateSelectorModal.displayName}
5655
>
5756
<HeaderWithBackButton
@@ -63,10 +62,9 @@ function TransactionStartDateSelectorModal({isVisible, date, handleSelectDate, o
6362
formID={ONYXKEYS.FORMS.ASSIGN_CARD_FORM}
6463
submitButtonText={translate('common.save')}
6564
onSubmit={submit}
66-
style={[styles.flex1, styles.mh5]}
65+
style={[styles.flexGrow1, styles.ph5]}
6766
enabledWhenOffline
6867
validate={validate}
69-
submitButtonStyles={[styles.mb0, styles.pb0, styles.mh0]}
7068
>
7169
<InputWrapper
7270
InputComponent={DatePicker}

0 commit comments

Comments
 (0)