Improves date header localization

Adds locale support to the date header renderer and date service.

This change ensures that the day names are displayed correctly based on the user's configured locale.

The date header now uses the configured locale to display the day name in the correct language.
The day name is now displayed in uppercase.

Additionally, styles the date header to highlight today's date.
This commit is contained in:
Janus C. H. Knudsen 2025-10-09 23:08:33 +02:00
parent 6f79954342
commit 8ca49037e9
4 changed files with 31 additions and 22 deletions

View file

@ -246,7 +246,7 @@ swp-day-header {
flex-direction: column;
align-items: center;
justify-content: center;
padding-top: 7px;
padding-top: 3px;
}
swp-day-header:last-child {
@ -299,27 +299,27 @@ swp-day-name {
font-weight: 500;
font-size: 12px;
color: var(--color-text-secondary);
letter-spacing: 0.1em;
}
swp-day-date {
display: block;
font-size: 20px;
font-weight: 600;
font-size: 30px;
margin-top: 4px;
height: 41px;
}
/* Highlight entire header for today */
swp-day-header[data-today="true"] {
background: rgba(33, 150, 243, 0.1);
}
swp-day-header[data-today="true"] swp-day-name {
color: var(--color-primary);
font-weight: 600;
}
swp-day-header[data-today="true"] swp-day-date {
color: var(--color-primary);
background: rgba(33, 150, 243, 0.1);
border-radius: 50%;
width: 41px;
height: 41px;
display: flex;
align-items: center;
justify-content: center;
margin: 4px auto 0;
}
/* Ghost columns for mouseenter events */