Skip to content

fix: replace yesterday with tomorrow in activity date selector - #300

Open
srush0 wants to merge 1 commit into
CITOpenRep:release/v1.3.3from
srush0:fix/activity-date-selector-299
Open

fix: replace yesterday with tomorrow in activity date selector#300
srush0 wants to merge 1 commit into
CITOpenRep:release/v1.3.3from
srush0:fix/activity-date-selector-299

Conversation

@srush0

@srush0 srush0 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Type

  • Bug Fix

Problem

The Activity Date Selector provided Yesterday as a predefined option, which was not suitable for setting upcoming activity due dates. It also needed to support selecting arbitrary custom dates reliably.

Changes

  • Replaced the Yesterday option with Tomorrow.
  • Updated the date calculation to correctly select the next day.
  • Added support for selecting custom dates through the date picker.
  • Added temporary customDate handling so custom date selection does not interfere with the current date until the picker is closed.
  • Updated date restoration logic to correctly identify Today, Tomorrow, and Custom dates.
  • Preserved the existing read-only behavior.

Testing

  • Verified git diff --check passes.
  • Successfully built the application using Clickable.
  • Verified the Activity Date Selector displays:
    • Today
    • Tomorrow
    • Custom
  • Verified Tomorrow resolves to the next calendar day.
  • Verified a custom date can be selected and displayed.
  • Runtime installation through clickable install was unavailable because no external device was detected.
  • Tested the application through the available desktop runtime.

Related Issue

Fixes #299

@suraj-yadav0 suraj-yadav0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @srush0 , Please raise the PR against the new release branch [release/v1.3.3]. Never raise the PR against the main branch.

@srush0
srush0 changed the base branch from main to release/v1.3.3 August 24, 2026 04:02

@suraj-yadav0 suraj-yadav0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DaySelector.qml is used in two places across the app, In Timesheet.qml and in Activities.qml.

Though this PR will work with Activities , It will break Functionality in Timesheets , where Users need to log Hours of Yesterday.

Recommended Fix:

Add a configurable bool property in DaySelector.qml

property bool showTomorrow: false


// In updateModelData() / updateDate() / setSelectedDate()
  const offsetDay = new Date(today);
  if (showTomorrow) {
      offsetDay.setDate(offsetDay.getDate() + 1);
  } else {
      offsetDay.setDate(offsetDay.getDate() - 1);
  }

  const offsetLabel = showTomorrow ? i18n.dtr("ubtms", "Tomorrow") : i18n.dtr("ubtms", "Yesterday"); 

Then in Activities.qml:

    DaySelector {
        id: date_widget
        showTomorrow: true
        ...
    }

So Timesheet continues Using Yesterday and Activites has Enhaced Date Selction .

@suraj-yadav0 suraj-yadav0 self-assigned this Aug 24, 2026
@suraj-yadav0 suraj-yadav0 added bug Something isn't working enhancement New feature or request good first issue Good for newcomers and removed good first issue Good for newcomers labels Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Activity Date Selector: Replace Yesterday with Tomorrow and Enable Custom Date Selection

2 participants