Skip to content

Commit 74fe026

Browse files
committed
fix incorrect values shown on the date field in reportFields
1 parent de3f8af commit 74fe026

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/libs/WorkspaceReportFieldUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function getReportFieldInitialValue(reportField: PolicyReportField | null): stri
8080
}
8181

8282
if (reportField.type === CONST.REPORT_FIELD_TYPES.DATE) {
83-
return Localize.translateLocal('common.initialValue');
83+
return Localize.translateLocal('common.currentDate');
8484
}
8585

8686
return reportField.value ?? reportField.defaultValue;

src/pages/workspace/reportFields/CreateReportFieldsPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ function WorkspaceCreateReportFieldsPage({
186186

187187
{inputValues[INPUT_IDS.TYPE] === CONST.REPORT_FIELD_TYPES.DATE && (
188188
<MenuItemWithTopDescription
189-
title={translate('common.initialValue')}
190-
description={translate('common.date')}
189+
title={translate('common.currentDate')}
190+
description={translate('common.initialValue')}
191191
rightLabel={translate('common.required')}
192192
interactive={false}
193193
/>

src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function ReportFieldsSettingsPage({
113113
style={[styles.moneyRequestMenuItem]}
114114
titleStyle={styles.flex1}
115115
title={WorkspaceReportFieldUtils.getReportFieldInitialValue(reportField)}
116-
description={isDateFieldType ? translate('common.date') : translate('common.initialValue')}
116+
description={translate('common.initialValue')}
117117
shouldShowRightIcon={!isDateFieldType && !hasAccountingConnections}
118118
interactive={!isDateFieldType && !hasAccountingConnections}
119119
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_EDIT_REPORT_FIELDS_INITIAL_VALUE.getRoute(policyID, reportFieldID))}

0 commit comments

Comments
 (0)