Skip to content

Commit

Permalink
Preserve start date when user go back to date edit from confirm page
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Feb 6, 2025
1 parent a8daefb commit 0fc2f20
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function TransactionStartDateStep() {

const [dateOptionSelected, setDateOptionSelected] = useState(data?.dateOption ?? CONST.COMPANY_CARD.TRANSACTION_START_DATE_OPTIONS.FROM_BEGINNING);
const [isModalOpened, setIsModalOpened] = useState(false);
const [startDate, setStartDate] = useState(() => format(new Date(), CONST.DATE.FNS_FORMAT_STRING));
const [startDate, setStartDate] = useState(() => data?.startDate ?? format(new Date(), CONST.DATE.FNS_FORMAT_STRING));

const handleBackButtonPress = () => {
if (isEditing) {
Expand Down

0 comments on commit 0fc2f20

Please sign in to comment.