fix calendar day initial
This commit is contained in:
parent
d2b2cea846
commit
988ab96bfb
1 changed files with 11 additions and 1 deletions
|
|
@ -159,7 +159,17 @@ function createEmptyCalendar() {
|
|||
calendar[normalizedMonth] = {};
|
||||
|
||||
for (let day = 1; day <= daysInMonth; day++) {
|
||||
calendar[normalizedMonth][day] = null;
|
||||
const currentDay = dayjs()
|
||||
.month(normalizedMonth - 1)
|
||||
.date(day);
|
||||
|
||||
const dayInitial = currentDay.format("dd")[0].toUpperCase();
|
||||
|
||||
calendar[normalizedMonth][day] = {
|
||||
sessions: [],
|
||||
full: currentDay.format("DD-MM-YYYY"),
|
||||
initial: dayInitial,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue