mirror of
https://github.com/usememos/memos.git
synced 2025-02-24 21:33:45 +08:00
chore: fix date picker
This commit is contained in:
parent
405fc2b4d2
commit
982b0285c9
1 changed files with 1 additions and 2 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue