[PR #1813] [MERGED] Hide "this weekend" option on Sunday after 9pm #3703

Closed
opened 2026-03-22 14:51:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/1813
Author: @Copilot
Created: 11/13/2025
Status: Merged
Merged: 11/13/2025
Merged by: @kolaente

Base: mainHead: copilot/fix-hide-this-weekend-option


📝 Commits (3)

  • 69bcbf1 Initial plan
  • b618143 feat: hide 'this weekend' option on Sunday after 9pm
  • 652aac8 Merge branch 'main' into copilot/fix-hide-this-weekend-option

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 frontend/src/components/input/DatepickerInline.vue (+1 -0)

📄 Description

On Sunday after 9pm, selecting "this weekend" sets the due date to 9am on the same Sunday (already past), making it unintuitive and effectively broken.

Changes

  • Added conditional rendering to hide the "this weekend" button on Sunday (day 0) when hour ≥ 21
  • Mirrors existing behavior where "today" is hidden after 9pm
<BaseButton
  v-if="!((new Date()).getDay() === 0 && (new Date()).getHours() >= 21)"
  class="datepicker__quick-select-date"
  @click.stop="setDate('thisWeekend')"
>

The root cause: calculateDayInterval('thisWeekend') returns 0 on Sunday (since Saturday is the weekend target and (6 - 0) % 6 = 0), causing the date to be set to the current day. After 9pm, calculateNearestHours sets it to 9am, resulting in a past timestamp.

Fixes #1805

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: node index.js --exec install (dns block)
  • googlechromelabs.github.io
    • Triggering command: node install.mjs (dns block)
  • https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.204/linux64/chrome-headless-shell-linux64.zip
    • Triggering command: node install.mjs (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Implement a fix for https://github.com/go-vikunja/vikunja/issues/1805.

The "this weekend" on a sunday should be hidden after 9pm, similar to the "today" option.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/1813 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 11/13/2025 **Status:** ✅ Merged **Merged:** 11/13/2025 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `copilot/fix-hide-this-weekend-option` --- ### 📝 Commits (3) - [`69bcbf1`](https://github.com/go-vikunja/vikunja/commit/69bcbf1df0a05876968c7274e5dca8c5b1b70552) Initial plan - [`b618143`](https://github.com/go-vikunja/vikunja/commit/b618143efb9c1a994c1b738c404cc55b0db56193) feat: hide 'this weekend' option on Sunday after 9pm - [`652aac8`](https://github.com/go-vikunja/vikunja/commit/652aac80115d87e040b650803c16f7fdb5dd986e) Merge branch 'main' into copilot/fix-hide-this-weekend-option ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/input/DatepickerInline.vue` (+1 -0) </details> ### 📄 Description On Sunday after 9pm, selecting "this weekend" sets the due date to 9am on the same Sunday (already past), making it unintuitive and effectively broken. ## Changes - Added conditional rendering to hide the "this weekend" button on Sunday (day 0) when hour ≥ 21 - Mirrors existing behavior where "today" is hidden after 9pm ```vue <BaseButton v-if="!((new Date()).getDay() === 0 && (new Date()).getHours() >= 21)" class="datepicker__quick-select-date" @click.stop="setDate('thisWeekend')" > ``` The root cause: `calculateDayInterval('thisWeekend')` returns 0 on Sunday (since Saturday is the weekend target and `(6 - 0) % 6 = 0`), causing the date to be set to the current day. After 9pm, `calculateNearestHours` sets it to 9am, resulting in a past timestamp. Fixes #1805 > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `download.cypress.io` > - Triggering command: `node index.js --exec install` (dns block) > - `googlechromelabs.github.io` > - Triggering command: `node install.mjs` (dns block) > - `https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.204/linux64/chrome-headless-shell-linux64.zip` > - Triggering command: `node install.mjs` (http block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/go-vikunja/vikunja/settings/copilot/coding_agent) (admins only) > > </details> <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > Implement a fix for https://github.com/go-vikunja/vikunja/issues/1805. > > The "this weekend" on a sunday should be hidden after 9pm, similar to the "today" option. </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-22 14:51:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#3703