Skip to content

Allow typing date directly into calendar overlay#73

Merged
mikenikles merged 2 commits into
webstonehq:mainfrom
AdamCarter27:main
Jun 27, 2026
Merged

Allow typing date directly into calendar overlay#73
mikenikles merged 2 commits into
webstonehq:mainfrom
AdamCarter27:main

Conversation

@AdamCarter27

Copy link
Copy Markdown
Contributor

Closes #28.

When the calendar opens after typing due:, all keystrokes were consumed
by the overlay — the only way to pick a date was keyboard navigation or
shortcuts like t/T. This PR lets you keep typing: digits, dashes, and
backspace pass through to the draft buffer while the calendar is open, and
the grid tracks the typed date live as it becomes valid.

Changes

  • Digit, dash, and backspace keys now pass through to the draft when the
    calendar was auto-triggered (anchor set), so you can type due:2027-01-01
    and have the calendar follow along
  • Calendar closes cleanly if you backspace past the colon
  • Existing shortcuts (t, T, w, m, hjkl) still work alongside typed input
  • Updated strip_trigger_literal to handle the typed value that now appears
    in the buffer, so accept produces a single clean token
  • Added tests for the new typing flow, backspace-to-close, and the strip fix

Note: I left auto-accept out for now, you still press Enter to confirm,
which felt more consistent with the rest of the overlay behavior. Happy to
add it if you'd prefer the calendar close automatically once a valid date
is complete.

@mikenikles

Copy link
Copy Markdown
Contributor

I left auto-accept out for now, you still press Enter to confirm,
which felt more consistent with the rest of the overlay behavior. Happy to
add it if you'd prefer the calendar close automatically once a valid date
is complete.

I don't have a strong opinion either way. Let's keep what's in the PR and if we or anyone else feel auto-accept is the way to go, we fix it in a follow up PR.

If you could fix the clippy error CI reported that'd be awesome.

@AdamCarter27

Copy link
Copy Markdown
Contributor Author

Ok it should be fixed now 👍

@mikenikles

Copy link
Copy Markdown
Contributor

Yep, thanks! I'll release a new version in the next 12 hours.

@mikenikles mikenikles merged commit 042d2a1 into webstonehq:main Jun 27, 2026
1 check passed
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.

[FEATURE] toggle for due: autocomplete

2 participants