date changes finally work
This commit is contained in:
parent
5b3d9efaf5
commit
57f1823b7a
@ -617,8 +617,6 @@
|
||||
|
||||
const init_schedules = (day) => {
|
||||
const day_of_schedule = day ? new Date(Date.parse(day)) : new Date();
|
||||
console.dir(day);
|
||||
console.dir(day_of_schedule);
|
||||
|
||||
for (let i = 0; i < 8; i++) {
|
||||
if (i === 0) {
|
||||
@ -640,16 +638,13 @@
|
||||
|
||||
const previous_day_schedule = (e) => {
|
||||
e.preventDefault();
|
||||
const day = Date.parse(document.querySelector("#current_day_indicator").getAttribute("data-day"));
|
||||
console.dir(day);
|
||||
const day = new Date(Date.parse(document.querySelector("#current_day_indicator").getAttribute("data-day")));
|
||||
day.setDate(day.getDate() - 1);
|
||||
init_schedules(day);
|
||||
}
|
||||
const next_day_schedule = (e) => {
|
||||
e.preventDefault();
|
||||
console.dir(e.target);
|
||||
const day = new Date(Date.parse(document.querySelector("#current_day_indicator").getAttribute("data-day")));
|
||||
console.dir(day);
|
||||
day.setDate(day.getDate() + 1);
|
||||
init_schedules(day);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user