From f3756dac8a49f3b5599fd50f4c631da4168e9eb0 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 24 Nov 2025 21:13:47 +0100 Subject: add jump-to month --- static/widgets/month-select/index.css | 9 +++++++++ static/widgets/month-select/index.js | 11 +++++++++++ 2 files changed, 20 insertions(+) (limited to 'static/widgets/month-select') diff --git a/static/widgets/month-select/index.css b/static/widgets/month-select/index.css index 95a87b0..25ed5d2 100644 --- a/static/widgets/month-select/index.css +++ b/static/widgets/month-select/index.css @@ -56,6 +56,10 @@ position: relative; } +.month-item.none { + font-style: italic; +} + .month-item:before { content: ''; display: block; @@ -84,6 +88,11 @@ height: 27px; } +.month-item.none:before { + top: 0; + height: 20px; +} + .month-item:hover { background: var(--primary); color: var(--fg-primary); diff --git a/static/widgets/month-select/index.js b/static/widgets/month-select/index.js index 6ffbac2..63caf70 100644 --- a/static/widgets/month-select/index.js +++ b/static/widgets/month-select/index.js @@ -70,5 +70,16 @@ export default class MonthSelect extends sfw.element.Container { last = month; } + + this.#month_container.append( + Div.new({ + className: 'month-item none', + innerText: 'No Date', + onclick: () => { + this.hide(); + this.onmonth(null); + } + }) + ); } } -- cgit v1.2.3-70-g09d2