Skip to content
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

The calendar block having issue with today date. #68451

Open
viralsampat-multidots opened this issue Jan 1, 2025 · 5 comments · May be fixed by #68458
Open

The calendar block having issue with today date. #68451

viralsampat-multidots opened this issue Jan 1, 2025 · 5 comments · May be fixed by #68458
Assignees
Labels
[Block] Calendar Affects the Calendar Block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@viralsampat-multidots
Copy link
Contributor

What problem does this address?

Hello Team,

I have worked with Gutenberg block and I have found the "Calendar" block having issue with today's date. The today's date is not highlighting, We can't assume which is today's once.

So, it should be highlighted, So user can easily knowing the today's date.

Here, I have taken screenshots to better understand.

Issue:
Image
Image
Image
Image

What is your proposed solution?

I think that the today's date should be highlighted.

Expected

Here, I have attached screenshot for expected result.
Image
Image

Thanks,

@viralsampat-multidots viralsampat-multidots added the [Type] Enhancement A suggestion for improvement. label Jan 1, 2025
@t-hamano t-hamano added the [Block] Calendar Affects the Calendar Block label Jan 2, 2025
@himanshupathak95
Copy link
Contributor

Hey @viralsampat-multidots, Thanks for bringing this up.

I tested the same, and it works fine for me both in the editor and front end. The "today's date" is highlighted correctly for me, although I do believe the highlight can be made more accessible.

Editor -

Image

Frontend -

Image

I noticed the highlight is different for different themes, perhaps you could provide more information on the environment and theme for reproduction.

@viralsampat-multidots
Copy link
Contributor Author

Hello @himanshupathak95

Thank you so much for the detail feedback.

Let me check it from my end, Also, I will provide all the environmental information in detail.

Thanks,

@benazeer-ben
Copy link
Contributor

I was able to reproduce this issue in the Twenty Twenty-Five, Twenty Twenty-Four, and Twenty Twenty-Three themes.

Please see the attached screenshot for reference.

Instead of relying on the theme's styles, it would be better to add the necessary styles directly to the Calendar block to ensure today's date is consistently highlighted across all themes.

Screenshare.-.2025-01-02.12_35_04.PM.mp4

@benazeer-ben benazeer-ben linked a pull request Jan 2, 2025 that will close this issue
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 2, 2025
@hanneslsm
Copy link

hanneslsm commented Jan 4, 2025

Instead of relying on the theme's styles, it would be better to add the necessary styles directly to the Calendar block to ensure today's date is consistently highlighted across all themes.

I wholeheartedly disagree. Styling is the essence of themes, so we should rely on it.
Some basic stylings come with the block editor as fallbacks and that's fine. The CSS specificity must be very low though, so that everyone can overwrite the styles. Best would be that every implemented fallback style would be also possible to change within the editor, not only CSS.

Highlighting the todays date as in this issue / the pull requests is in my opinion not the way to got. On the other hand, giving theme creators and users the possibility to highlight the date is.

@hanneslsm
Copy link

(Site note: The title of the issue can be more specific and like a enhancement suggestion, e.g. Calendar: Add styling to highlight todays date.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Calendar Affects the Calendar Block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants