Skip to content

Show a calendar while typing due: and t: dates in the new task entry - #185

Open
mbrettschneider wants to merge 3 commits into
JMoerman:masterfrom
mbrettschneider:date-picker
Open

mbrettschneider wants to merge 3 commits into
JMoerman:masterfrom
mbrettschneider:date-picker

Conversation

@mbrettschneider

Copy link
Copy Markdown

Builds on #184 (tag autocompletion) and reuses its popover approach, so this PR also contains #184's two commits. Only the last commit, "Show a calendar while typing due: and t: dates…", is new. Once #184 is merged, the diff shrinks to that commit.

Typing due: or t: in the "Add new task" entry opens a calendar in a popover above the entry:

  • it starts at today, and follows a date that is typed in full (due:2026-12-24)
  • clicking a day inserts it, e.g. due:2026-11-22 ; the month and year arrows only change what is shown
  • keyboard: Left/Right move one day, Up/Down one week, Page Up/Page Down one month, Enter or Tab insert the selected date, Escape closes the calendar
  • Enter after a fully typed date that was not changed in the calendar still adds the task, so no second Enter is needed
  • the keyboard focus stays in the entry the whole time

t: is offered as well because the parser already reads threshold dates, even though tasks are not hidden until their threshold date at the moment.

The code is a new DateCompletion class next to TagCompletion, hooked into TaskListWidget the same way.

Partially addresses #177 (with #184, only the priority picker from that issue is left).

🤖 Generated with Claude Code

mbrettschneider and others added 3 commits November 13, 2026 07:07
Typing + or @ in the "Add new task" entry shows the projects or contexts
used in the list; typing on narrows the list (case-insensitive). The
part all matches share is filled in inline and accepted with Tab or
Right.

Closes JMoerman#168, partially addresses JMoerman#177.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gtk.EntryCompletion's popup is a separate window placed with screen
coordinates, so on Wayland it can open far away from the entry (seen with
several monitors). A non-modal popover is part of the main window and
points at the word being completed.

Up/Down select a tag, Enter or Tab insert it, Escape closes the list.
Without a selected tag, Enter still adds the task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Typing "due:" or "t:" opens a calendar in a popover above the entry. It
follows a fully typed date. Clicking a day inserts it; with the keyboard,
Left/Right move a day, Up/Down a week, Page Up/Down a month, and Enter or
Tab insert the date. Escape closes the calendar. Enter after a typed date
that was not changed in the calendar still adds the task.

Partially addresses JMoerman#177.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant