@@ -, +, @@ buttons - Circulation -> Check out -> Checkout settings -> Select date: - The calendar widget should have "yesterday," "today," and "tomorrow" controls styled like links appearing after the time selector. The controls should be centered, with the "or" label on the same line. - Tools -> Log viewer -> Display from. --- .../prog/css/src/_flatpickr.scss | 33 +++++++++++++++++++ .../prog/en/includes/calendar.inc | 6 ++-- 2 files changed, 36 insertions(+), 3 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/css/src/_flatpickr.scss +++ a/koha-tmpl/intranet-tmpl/prog/css/src/_flatpickr.scss @@ -963,3 +963,36 @@ span.flatpickr-weekday { .flatpickr_wrapper { white-space: nowrap; } + +/* Shortcut buttons plugin */ + +.shortcut-buttons-flatpickr-wrapper { + display: flex; + justify-content: center; + padding: 5px; + + .shortcut-buttons-flatpickr-label { + align-content: center; + display: flex; + justify-content: center; + flex-direction: column; + padding: 0 5px; + } + + .shortcut-buttons-flatpickr-buttons { + display: flex; + flex-flow: row wrap; + + .shortcut-buttons-flatpickr-button { + background: transparent none; + border: 0; + color: #004D99; + font-size: 90%; + margin: 2px; + + &:hover { + color: #538200; + } + } + } +} --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -98,18 +98,18 @@ label: __("Tomorrow") } ], - label: "or", + label: __("or"), onClick: (index, fp) => { let date; switch (index) { case 0: - date = new Date(Date.now() - 24 * 60 * 60 * 1000); + date = new Date().fp_incr(-1); break; case 1: date = new Date(); break; case 2: - date = new Date(Date.now() + 24 * 60 * 60 * 1000); + date = new Date().fp_incr(1); break; } date.setHours(23, 59, 0, 0); --