Calender View Sync Prototype Working Correctly
This commit is contained in:
@@ -4,17 +4,13 @@ function addDays(date, days) {
|
||||
return result;
|
||||
}
|
||||
|
||||
export default function DateElement(props){
|
||||
let startDate;
|
||||
let endDate;
|
||||
const currDate = new Date();
|
||||
export default function DateElement(p){
|
||||
|
||||
startDate = addDays(currDate, (currDate.getDay()-1)*-1); //berechnet den Montag der aktuellen Woche
|
||||
startDate = addDays(startDate, props.week*7); //erhöht das Datum um 7 Tage für jede Woche, die weiter geklickt wurde.
|
||||
endDate = addDays(startDate, 6);
|
||||
let startDate = new Date(p.year, 0, p.startday);
|
||||
let endDate = new Date(p.year, 0, p.startday + 5);
|
||||
|
||||
const startDateString = `${startDate.getDate()}.${startDate.getMonth()+1}.${startDate.getFullYear()}`;
|
||||
const endDateString = `${endDate.getDate()}.${endDate.getMonth()+1}.${endDate.getFullYear()}`;
|
||||
let startDateString = `${startDate.getDate()}.${startDate.getMonth()+1}.${startDate.getFullYear()}`;
|
||||
let endDateString = `${endDate.getDate()}.${endDate.getMonth()+1}.${endDate.getFullYear()}`;
|
||||
return (
|
||||
<>
|
||||
<div className="dateElement round-border">
|
||||
|
||||
Reference in New Issue
Block a user