mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: fix date picker
This commit is contained in:
@@ -39,9 +39,8 @@ const DatePicker: React.FC<DatePickerProps> = (props: DatePickerProps) => {
|
|||||||
}, [user.username]);
|
}, [user.username]);
|
||||||
|
|
||||||
const firstDate = new Date(currentDateStamp);
|
const firstDate = new Date(currentDateStamp);
|
||||||
const firstDateDay = firstDate.getDay() === 0 ? 7 : firstDate.getDay();
|
|
||||||
const dayList = [];
|
const dayList = [];
|
||||||
for (let i = 1; i < firstDateDay; i++) {
|
for (let i = 0; i < firstDate.getDay(); i++) {
|
||||||
dayList.push({
|
dayList.push({
|
||||||
date: 0,
|
date: 0,
|
||||||
datestamp: firstDate.getTime() - DAILY_TIMESTAMP * (7 - i),
|
datestamp: firstDate.getTime() - DAILY_TIMESTAMP * (7 - i),
|
||||||
|
Reference in New Issue
Block a user