mirror of
https://github.com/usememos/memos.git
synced 2024-12-20 01:31:29 +03:00
chore: fix date picker
This commit is contained in:
parent
405fc2b4d2
commit
982b0285c9
@ -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 New Issue
Block a user