chore: fix date picker

This commit is contained in:
Steven 2023-11-05 16:02:51 +08:00
parent 405fc2b4d2
commit 982b0285c9

View File

@ -39,9 +39,8 @@ const DatePicker: React.FC<DatePickerProps> = (props: DatePickerProps) => {
}, [user.username]);
const firstDate = new Date(currentDateStamp);
const firstDateDay = firstDate.getDay() === 0 ? 7 : firstDate.getDay();
const dayList = [];
for (let i = 1; i < firstDateDay; i++) {
for (let i = 0; i < firstDate.getDay(); i++) {
dayList.push({
date: 0,
datestamp: firstDate.getTime() - DAILY_TIMESTAMP * (7 - i),