obsidian-community / obsidian-full-calendar

Keep events and manage your calendar alongside all your other notes in your Obsidian Vault.
https://davish.github.io/obsidian-full-calendar/
MIT License
801 stars 107 forks source link

Scroll Bar Appearing - Hides Dates #476

Open valiantgenomics opened 1 year ago

valiantgenomics commented 1 year ago

Please check that this issue hasn't been reported before.

Expected Behavior

Just a few days ago, I began noticing a bug. This scroll bar appears in the far right of the monthly view and hides all the date numbers.

Up until now this wasn't occurring.

I modified the plugin so that NonCurrentDates are hidden, as per:

https://fullcalendar.io/docs/showNonCurrentDates

I've been running this modified version for 6+ months without issues.

But now I believe it's the culprit of the scroll bar bug.

Check the screenshot below. You can see how the scroll bar on the right side hides the dates. And the scroll bar appears because at the very bottom of the calendar, there's a teeny tiny colored line being added which increases the length of the calendar ever so slightly, hence prompting the scroll bar to appear.

image

However, this happens only on certain months, not all. For example, the screenshot below shows a month which doesn't have this color line at the bottom, and therefore, no scrollbar.

image

Any ideas why this little colored line appears at the bottom? Is it because of ShowNonCurrentDates? I really like having the non-current dates hidden. It really helps me focus on the current month itself and nothing else.

Thanks a ton!

Current behaviour

N/A

JavaScript console output

No response

Steps to reproduce

N/A

Calendar information

N/A

Which Operating Systems are you using?

Obsidian Version

Latest

Full Calendar Plugin Version

0.10.7

Checks

Possible solution

No response

Comments

No response

valiantgenomics commented 10 months ago

After quite a lot of troubleshooting and modifying the CSS code, I found the solution to this problem myself.

Or at least for now it seems to be hiding the scroll bar.

Simply add a negative 3 to 5 px margin here:

.fc .fc-daygrid-day-bottom {
  font-size: .85em;
  padding: 2px 3px 0;
  margin-bottom: -5px; /* Added negative margin to pull up the bottom */
}

And also add overflow-y: hidden here:

.fc .fc-scroller {
  -webkit-overflow-scrolling: touch;
  overflow-y: hidden; /* Hide vertical scrollbar */
  position: relative;
}

If these 2 modifications don't work, then revert them. And then delete this entire piece of code:

.fc .fc-daygrid-day-bottom {
  font-size: .85em;
  padding: 2px 3px 0;
}

This should hide the scroll bar.

If for whatever reason it stops working, I'll report back.

Cheers