From f89c5fe1f7aa4d3faa8cffc701f68c569b659d35 Mon Sep 17 00:00:00 2001
From: cris-valente <88455718+cris-valente@users.noreply.github.com>
Date: Wed, 7 Feb 2024 14:04:39 +0100
Subject: [PATCH 01/35] bug fix chbx to nb
---
index.js | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/index.js b/index.js
index 62308bf..3e15526 100644
--- a/index.js
+++ b/index.js
@@ -150,9 +150,8 @@ function adaptCheckboxClass() {
//For every chbx testing if it's assigned day matches current day
//For month days and week days
-
- if (checkbox.dataset.assignedDay.includes(checkbox.dataset.weekday)
- ||checkbox.dataset.assignedDay === checkbox.dataset.day) {
+ if (checkbox.dataset.assignedDay.includes(checkbox.dataset.weekday)||
+ Number(checkbox.dataset.assignedDay) === Number(checkbox.dataset.day.slice(7, 10))) {
//Testing to know if task is past due date
if (compareDates(checkbox.dataset.day, now)){
checkbox.classList.add('bold-checkbox', 'future')
From 7429c614366547ba55687a0c6033b012c73b4aed Mon Sep 17 00:00:00 2001
From: cris-valente <88455718+cris-valente@users.noreply.github.com>
Date: Wed, 7 Feb 2024 14:13:03 +0100
Subject: [PATCH 02/35] weekdays in local language
---
index.js | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/index.js b/index.js
index 3e15526..9203c12 100644
--- a/index.js
+++ b/index.js
@@ -51,16 +51,10 @@ function renderCalendar() {
for (let i = 1; i <= daysInMonth; i++) {
let currentDate = new Date(SelectedMonth.getFullYear(), SelectedMonth.getMonth(), i);
- let currentDayOfWeek = new Intl.DateTimeFormat("en-US", {
+ let currentDayOfWeek = new Intl.DateTimeFormat(undefined, {
weekday: "short",
- }).format(currentDate);
+ }).format(currentDate)[0].toUpperCase();
- if (currentDayOfWeek === "Sat") {
- currentDayOfWeek = "Sa";
- }
- else {
- currentDayOfWeek = currentDayOfWeek[0];
- }
if (i === now.getDate() && now.getTime() === SelectedMonth.getTime()) {
daysHtml += `
From 94c0405700ea481c7bff306a18b770d93cdd3cf0 Mon Sep 17 00:00:00 2001
From: cris-valente <88455718+cris-valente@users.noreply.github.com>
Date: Wed, 7 Feb 2024 14:18:54 +0100
Subject: [PATCH 03/35] capitalize
---
index.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/index.js b/index.js
index 9203c12..768f1bf 100644
--- a/index.js
+++ b/index.js
@@ -26,8 +26,11 @@ document.addEventListener('click', (e) => {
function renderSelectedMonth() {
const monthEl = document.getElementById('month')
+ const month = SelectedMonth.toLocaleString('default', { month: 'long' })
+ const capitalizedMonth = month.charAt(0).toUpperCase() + month.slice(1);
+
monthEl.textContent = `
- ${SelectedMonth.toLocaleString('default', { month: 'long' })}
+ ${capitalizedMonth}
${SelectedMonth.getFullYear()}`
text = ``;
From 2cb9445706f0e0945a51e4727a781be5730df835 Mon Sep 17 00:00:00 2001
From: cris-valente <88455718+cris-valente@users.noreply.github.com>
Date: Wed, 7 Feb 2024 17:22:41 +0100
Subject: [PATCH 04/35] push
---
index.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/index.js b/index.js
index 768f1bf..5d4e39a 100644
--- a/index.js
+++ b/index.js
@@ -46,7 +46,6 @@ function renderSelectedMonth() {
function renderCalendar() {
let datesHtml = "";
let daysHtml = "";
-
const daysEl = document.getElementById("weekdays");
const datesEl = document.getElementById("month-dates");
const daysInMonth = new Date(SelectedMonth.getFullYear(), SelectedMonth.getMonth() + 1, 0).getDate();
From 82a80f5462d8182a2f8676d61911ed5f38feb779 Mon Sep 17 00:00:00 2001
From: cris-valente <88455718+cris-valente@users.noreply.github.com>
Date: Wed, 7 Feb 2024 18:31:24 +0100
Subject: [PATCH 05/35] to be finished
---
index.html | 39 +++++++++++++++++++++++++--------------
styles.css | 19 +++++++++++++++++++
2 files changed, 44 insertions(+), 14 deletions(-)
diff --git a/index.html b/index.html
index 664b498..c79bb8c 100644
--- a/index.html
+++ b/index.html
@@ -12,23 +12,34 @@
-