Skip to content

Commit

Permalink
fix date not being set when visiting site for the first time
Browse files Browse the repository at this point in the history
  • Loading branch information
sam9116 committed Feb 6, 2024
1 parent e840af7 commit ae6ba25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PickDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function PickDate({ updateStartDateInParent, updateEndDateInParent }) {
const oneYearFromNow = new Date(today);
oneYearFromNow.setFullYear(today.getFullYear() + 1);

const [startDate, setStartDate] = useState(cachedStartDate === null ? new Date() : new Date(cachedStartDate));
const [startDate, setStartDate] = useState(cachedStartDate === null ? today : new Date(cachedStartDate));
const [endDate, setEndDate] = useState(cachedEndDate === null ? oneYearFromNow : new Date(cachedEndDate));

// Display spotify token
Expand Down

0 comments on commit ae6ba25

Please sign in to comment.