Calender Sidebar Get Months from Semester
This commit is contained in:
@@ -1,22 +1,28 @@
|
||||
import {useEffect} from "react";
|
||||
|
||||
let startParts = []
|
||||
let endParts = []
|
||||
const months = [["Januar", 31], ["Februar", 28], ["März", 31], ["April", 30], ["Mai", 31], ["Juni", 30], ["Juli", 31], ["August", 31], ["September", 30], ["Oktober", 31], ["November", 30], ["Dezember", 31]]
|
||||
const days = months.map((month => month[1]))
|
||||
let result = []
|
||||
let check = true
|
||||
let startDate
|
||||
let calculatedDay = []
|
||||
const weekdays = ["Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"]
|
||||
|
||||
export default function BasicDateCalendar(p) {
|
||||
if (check) {
|
||||
|
||||
useEffect(() => {
|
||||
startParts = []
|
||||
endParts = []
|
||||
result = []
|
||||
calculatedDay = []
|
||||
|
||||
startDate = new Date(p.startyear, 0 ,p.startday)
|
||||
let endDate = new Date(p.endyear, 0 , p.endday)
|
||||
let startString = startDate.getDate() + "." + (startDate.getMonth() + 1) + "." + p.startyear
|
||||
let endString = endDate.getDate() + "." + (endDate.getMonth() + 1) + "." + p.endyear
|
||||
generateCalendar(startString, endString)
|
||||
check = false
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<div className={"Allround"}>
|
||||
|
||||
Reference in New Issue
Block a user