From 01f3f290809502b397f15d079e9b8e9772dcf013 Mon Sep 17 00:00:00 2001 From: 10001shh Date: Wed, 27 May 2020 00:09:37 -0500 Subject: [PATCH] fixed calendar bug --- js/calendar.js | 6 ++++-- manifest.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/calendar.js b/js/calendar.js index ce1e3f75..29aa5f52 100644 --- a/js/calendar.js +++ b/js/calendar.js @@ -232,6 +232,8 @@ $(function () { //create the event object for every section function setEventForSection(session, colorCounter, i) { + console.log(moment().startOf('month').format("YYYY-MM-D")); + console.log(moment().day(fullday)); var fullday = days.get(session[0]); var classInfo = savedCourses[i]; var department = classInfo.coursename.substring(0, classInfo.coursename.search(/\d/) - 2); @@ -242,7 +244,7 @@ $(function () { } classSchedules.push({ title: `${department}-${course_nbr} with ${uncapProf}`, - start: moment().startOf('week').format("YYYY-MM-") + + start: moment().startOf('month').format("YYYY-MM-") + moment() .day(fullday) ._d.toString() @@ -250,7 +252,7 @@ $(function () { "T" + session[1][0] + ":00", - end: moment().startOf('week').format("YYYY-MM-") + + end: moment().startOf('month').format("YYYY-MM-") + moment() .day(fullday) ._d.toString() diff --git a/manifest.json b/manifest.json index 2b5454c8..0bc38607 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "UT Registration Plus", - "version": "0.2.2", + "version": "0.2.2.1", "options_page": "options.html", "description": "Improves the course registration process at the University of Texas at Austin!", "permissions": ["tabs",