Skip to content

No method to show current month #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
darkseal92 opened this issue Mar 15, 2025 · 3 comments
Open

No method to show current month #270

darkseal92 opened this issue Mar 15, 2025 · 3 comments

Comments

@darkseal92
Copy link

This should be simple since I can sort of get a whole month view by using the included parameters to start my view on a Sunday and add weeks after and before… but I cannot explicitly have it show the current month like a traditional calendar. This I think would be relatively simple to add. I just want it to show the current month name at the top, and then show the days in the correct column. So like Sunday is the leftmost column. And if the month (the 1st) starts mid week, obviously show greyed out events for those days but still show them.

@EricLauber
Copy link

I also came to ask for this, I'll expand on it a bit more.

Days that we see

Different locales use different 'first days of the week'. Monday, Saturday, and Sunday are common. There's already functionality today in week-planner-card to request a month's worth of days, and to specify which day appears in the leftmost column. Cool.

Today is Thursday March 19. I'm in the United States where Sunday is a common first day of the week. Configuring the calendar for a month and Sunday will start the calendar at Sunday March 16, and run through Tuesday, April 15.

It's providing 30 days, but I want the current month. I would have instead expected:

  • The beginning of the month, March 1, was a Saturday. So I should see that entire week including the previous Sunday, which was February 23.
  • The end of the month, March 31, is a Tuesday. I should see that entire week, through April 5.
  • The days that are outside of the "current month" could be grayed out or have a different style applied to them.

Other visual improvements related to a month

There are a few other assumptions I think that come with displaying a calendar this way. I am trying to setup a full-screen calendar, so in Home Assistant I am configuring the layout for this card to be "full width", and configuring the width for the "section" that contains the card to be as wide as the "view." On some displays, this works pretty well.

Image

However if I do anything that impacts the font size, it becomes clear that the days are styled separately and the week grouping or the row as a whole is not treated as one object. Note the different heights of the events when the name of the day is pushed downward due to the increased font size.

Image

An easy point of comparison is Google Calendar's web app. It's a grid, you see the whole month, and each day is always the same size. The names of the days appear only at the top, as headers to the grid.

Image

@darkseal92
Copy link
Author

I also came to ask for this, I'll expand on it a bit more.

Days that we see

Different locales use different 'first days of the week'. Monday, Saturday, and Sunday are common. There's already functionality today in week-planner-card to request a month's worth of days, and to specify which day appears in the leftmost column. Cool.

Today is Thursday March 19. I'm in the United States where Sunday is a common first day of the week. Configuring the calendar for a month and Sunday will start the calendar at Sunday March 16, and run through Tuesday, April 15.

It's providing 30 days, but I want the current month. I would have instead expected:

  • The beginning of the month, March 1, was a Saturday. So I should see that entire week including the previous Sunday, which was February 23.
  • The end of the month, March 31, is a Tuesday. I should see that entire week, through April 5.
  • The days that are outside of the "current month" could be grayed out or have a different style applied to them.

Other visual improvements related to a month

There are a few other assumptions I think that come with displaying a calendar this way. I am trying to setup a full-screen calendar, so in Home Assistant I am configuring the layout for this card to be "full width", and configuring the width for the "section" that contains the card to be as wide as the "view." On some displays, this works pretty well.

Image

However if I do anything that impacts the font size, it becomes clear that the days are styled separately and the week grouping or the row as a whole is not treated as one object. Note the different heights of the events when the name of the day is pushed downward due to the increased font size.

Image

An easy point of comparison is Google Calendar's web app. It's a grid, you see the whole month, and each day is always the same size. The names of the days appear only at the top, as headers to the grid.

Image

I just want to say you did an excellent job of very clearly articulating exactly what I want as well. We're looking for the exact same thing but I did a poorer job describing it. So thank you for putting this effort into very clearly laying it out! I hope this can be implemented as I'm not sure I'm savvy enough to make my own fork and attempt to contribute directly to this project. And thank you to the original creator of this as it is nearly exactly what I would like to use, just needs these minor tweaks.

@EricLauber
Copy link

EricLauber commented Mar 20, 2025

I haven't looked at how this is built, but based on the current capabilities I suspect our request would be challenging. The date rendering is based around a day object, and the configuration is about which day you show first.

A traditional calendar would be styled at a month level, it's very different. That said, I haven't found many other options for Home Assistant that list the events in the day object this way, so if it were possible to lay out days in a month grid with uniform size while keeping the content the same as it is currently, that would be awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants