Files
wekan/client/components/forms/calendarDateInput.css
T
Lauri Ojansivu dcaa316a01 Date picker popup: the year is a number field, any year by typing or stepping.
A list of years had to end somewhere. The year is now a whole number
(0 is 1 BC) found by jumping through the calendar in use, so thousands of
years back or ahead are one entry away, up to the range a date holds.

Thanks to brlin-tw and xet7 !

Fixes #6853,
2026-11-02 11:17:02 +02:00

131 lines
3.8 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;
}
/* #6853: year, month and day drop-downs under the calendar. */
.selected-calendar-selects {
display: flex;
gap: 4px;
margin-block-start: 6px;
}
.selected-calendar-selects select,
.selected-calendar-selects input {
flex: 1;
box-sizing: border-box;
height: auto;
margin-bottom: 0;
min-width: 0;
padding-inline: 4px;
}
.selected-calendar-selects .js-calendar-year { flex: 1.4; }
.calendar-date-input .selected-calendar-selects select:focus-visible,
.calendar-date-input .selected-calendar-selects input:focus-visible {
outline: 2px solid currentColor;
outline-offset: 2px;
}