mirror of
https://github.com/wekan/wekan.git
synced 2026-11-26 14:45:11 -05:00
The board Calendar view already has Today (and Calendar mode too), but the date picker of every date popup - Due, Start, End, Received and the rest - had only « ‹ › », so a user who paged to another month had to page back. Today, between the month and ›, shows today's month and focuses today; it changes nothing until a day is clicked and saved. Testing it found a picker bug that was already there: going back to a month drew it wrong - October came back as "29, empty, 30, empty", with no 31st. Blaze matches list items by _id, and the weeks and days had none; the empty cells, all alike, were moved around. Every week and cell, empty ones too, now has an _id that names its month. calendarPickerControls.test.cjs checks the ids, that Today shows today's month and focuses today, and that it selects nothing; the Playwright test pages two months ahead, presses Today, and checks every day of the month in order, today focused, and the card's due date unchanged. Thanks to mimZD and xet7 ! Fixes #6838,
113 lines
3.3 KiB
CSS
113 lines
3.3 KiB
CSS
.calendar-date-input {
|
|
min-width: 0;
|
|
width: 100%;
|
|
}
|
|
.calendar-date-input > input,
|
|
.calendar-date-input > .js-calendar-toggle {
|
|
box-sizing: border-box;
|
|
max-width: 100%;
|
|
}
|
|
.selected-calendar-picker {
|
|
background: inherit;
|
|
color: inherit;
|
|
margin-block: 8px;
|
|
width: 100%;
|
|
}
|
|
.selected-calendar-heading {
|
|
align-items: center;
|
|
display: flex;
|
|
gap: 3px;
|
|
justify-content: space-between;
|
|
}
|
|
.selected-calendar-heading span {
|
|
flex: 1;
|
|
text-align: center;
|
|
}
|
|
.selected-calendar-heading button,
|
|
.selected-calendar-picker .js-calendar-day {
|
|
margin: 0;
|
|
min-width: 24px;
|
|
padding: 4px;
|
|
}
|
|
.calendar-date-input .selected-calendar-picker table {
|
|
table-layout: fixed;
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
color: inherit;
|
|
}
|
|
.calendar-date-input .selected-calendar-picker table th {
|
|
font-size: calc(10px * var(--wekan-ui-font-scale, 1));
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
.calendar-date-input .selected-calendar-picker table td {
|
|
text-align: center;
|
|
padding: 2px;
|
|
}
|
|
.selected-calendar-picker td .js-calendar-day {
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
min-width: 0;
|
|
min-height: 36px;
|
|
padding: 4px 0;
|
|
}
|
|
.selected-calendar-picker .js-calendar-day[aria-pressed='true'] {
|
|
font-weight: bold;
|
|
outline: 2px solid currentColor;
|
|
}
|
|
/* #6751: today's day is distinct from every other day, in every theme. Today
|
|
gets its OWN fill - green with white text - instead of a mark drawn on the
|
|
theme's fill: a ring in the button's text colour was too faint on themes
|
|
whose day buttons are already a strong colour (wisteria's purple, #6751
|
|
comment 6097142848). The fill and the text colour are !important because the
|
|
custom theme colour sets the picker buttons' background with !important; the
|
|
selector (0,4,1) is more specific than every theme's `.board-color-x
|
|
.selected-calendar-picker button.primary` (0,3,1), so it wins over all of
|
|
them. The white inset ring and the underline still mark it without colour
|
|
vision. Logical properties only: RTL-safe. */
|
|
.calendar-date-input .selected-calendar-picker button.js-calendar-day.is-today {
|
|
background: #2e7d32 !important;
|
|
color: #fff !important;
|
|
box-shadow: inset 0 0 0 2px #fff;
|
|
font-weight: bold;
|
|
text-decoration: underline;
|
|
text-decoration-thickness: 2px;
|
|
text-underline-offset: 3px;
|
|
}
|
|
/* Today and selected: the selected outline is drawn outside the button in
|
|
today's green, as white (the text colour) would vanish on a light popup. */
|
|
.calendar-date-input .selected-calendar-picker button.js-calendar-day.is-today[aria-pressed='true'] {
|
|
outline: 2px solid #2e7d32;
|
|
outline-offset: 2px;
|
|
}
|
|
.calendar-date-input .selected-calendar-picker td.is-today-cell {
|
|
background: color-mix(in srgb, currentColor 15%, transparent);
|
|
border-radius: 9px;
|
|
}
|
|
.calendar-date-input button:focus-visible,
|
|
.calendar-time-input select:focus-visible,
|
|
.calendar-date-input input:focus-visible {
|
|
outline: 2px solid currentColor;
|
|
outline-offset: 2px;
|
|
}
|
|
.calendar-time-input {
|
|
align-items: center;
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
.calendar-time-input select {
|
|
flex: 1;
|
|
min-width: 0;
|
|
margin-bottom: 0;
|
|
padding-inline: 4px;
|
|
}
|
|
|
|
/* #6838: a word, not an arrow - it may be wider than the arrows beside it. */
|
|
.selected-calendar-heading .js-calendar-today {
|
|
white-space: nowrap;
|
|
padding-inline: 6px;
|
|
}
|
|
.selected-calendar-heading .selected-calendar-date {
|
|
margin-inline-start: 4px;
|
|
}
|