mirror of
https://github.com/ION606/selmer-bot-website.git
synced 2026-05-14 22:16:54 +00:00
Added a header that displays the month
This commit is contained in:
+4
-6
@@ -401,16 +401,14 @@
|
|||||||
|
|
||||||
const res = JSON.parse(xhr2.response);
|
const res = JSON.parse(xhr2.response);
|
||||||
const times = res[0];
|
const times = res[0];
|
||||||
|
const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
||||||
|
document.getElementById('monthName').innerText = `Editing Reminders for the Month of ${monthNames[(new Date()).getMonth()]}`;
|
||||||
|
|
||||||
times.forEach((time, ind) => {
|
times.forEach((time, ind) => {
|
||||||
|
|
||||||
const fullDate = new Date(Number(time));
|
const fullDate = new Date(Number(time));
|
||||||
const month = fullDate.getMonth();
|
const month = fullDate.getMonth();
|
||||||
const day = fullDate.getDate();
|
const day = fullDate.getDate();
|
||||||
|
|
||||||
const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
||||||
document.getElementById('monthName').innerText = `Editing Reminders for the Month of ${monthNames[month]}`;
|
|
||||||
|
|
||||||
//Make sure it's the right month (old ones should be removed, this is just a catch)
|
//Make sure it's the right month (old ones should be removed, this is just a catch)
|
||||||
if (month == (new Date()).getMonth()) {
|
if (month == (new Date()).getMonth()) {
|
||||||
if (calList.has(day)) {
|
if (calList.has(day)) {
|
||||||
@@ -467,8 +465,8 @@
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
<div id="cal", class="wc" style="margin-top: 20px;">
|
<div id="cal" class="wc" style="margin-top: 20px;">
|
||||||
<h1 id="monthName", style="text-align: center; margin-top: 50px; margin-bottom: 25px;"></h1>
|
<h1 id="monthName" style="text-align: center; margin-top: 50px; margin-bottom: 25px;"></h1>
|
||||||
<form>
|
<form>
|
||||||
<table id="spaceId" style="background-color: lightgrey;"
|
<table id="spaceId" style="background-color: lightgrey;"
|
||||||
cellspacing="15" cellpadding="15" class="mx-auto">
|
cellspacing="15" cellpadding="15" class="mx-auto">
|
||||||
|
|||||||
+2
-4
@@ -457,16 +457,14 @@
|
|||||||
|
|
||||||
const res = JSON.parse(xhr2.response);
|
const res = JSON.parse(xhr2.response);
|
||||||
const times = res[0];
|
const times = res[0];
|
||||||
|
const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
||||||
|
document.getElementById('monthName').innerText = `Editing Reminders for the Month of ${monthNames[(new Date()).getMonth()]}`;
|
||||||
|
|
||||||
times.forEach((time, ind) => {
|
times.forEach((time, ind) => {
|
||||||
|
|
||||||
const fullDate = new Date(Number(time));
|
const fullDate = new Date(Number(time));
|
||||||
const month = fullDate.getMonth();
|
const month = fullDate.getMonth();
|
||||||
const day = fullDate.getDate();
|
const day = fullDate.getDate();
|
||||||
|
|
||||||
const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
||||||
document.getElementById('monthName').innerText = `Editing Reminders for the Month of ${monthNames[month]}`;
|
|
||||||
|
|
||||||
//Make sure it's the right month (old ones should be removed, this is just a catch)
|
//Make sure it's the right month (old ones should be removed, this is just a catch)
|
||||||
if (month == (new Date()).getMonth()) {
|
if (month == (new Date()).getMonth()) {
|
||||||
if (calList.has(day)) {
|
if (calList.has(day)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user