Add quick due date preset buttons to task creation#316
Merged
Conversation
Adds a row of small preset buttons below the due date input in the task creation drawer: Now, +1/+3/+6/+12/+24 hours set a datetime due date, while Today, Tomorrow, +2/+4 days set a date-only due date (end-of-day sentinel). The due date stays empty until a preset is clicked or a value is entered manually. Presets are computed in the configured app timezone and the buttons wrap on narrow viewports. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011FUW7ckxf9AFki2eubR3sX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds two rows of small preset buttons below the due date input in the task creation drawer:
Now,+1 hour,+3 hours,+6 hours,+12 hours,+24 hours— set a full datetime due date (seconds zeroed, current time plus offset).Today,Tomorrow,+2 days,+4 days— set a date-only due date using the existing end-of-day sentinel (23:59:59.999), so the input switches to date mode without a time.The due date stays empty by default; a value is only set when a preset is clicked or entered manually. The buttons appear only in create mode, not when editing an existing task.
How
DueDateQuickSelectcomponent (web/components/tasks/DueDateQuickSelect.tsx) using hightideButton size="xs"withflex-wraprows so they wrap cleanly on mobile.DueDateUtils.dateTimeInHours/DueDateUtils.dateOnlyInDayshelpers that compute the preset in the configured app timezone (RUNTIME_TIMEZONE), matching the existingparseFromApi/serializeForApiwall-clock convention.TaskDataEditorremounts theFlexibleDateTimeInput(keyed by a click counter) when a preset is applied, since the input derives its date/dateTime mode only on mount — same pattern the edit mode already uses.dueDateNow,dueDateToday,dueDateTomorrow,dueDateInHours,dueDateInDays) added to all six locales with ICU plurals;translations.tsregenerated vianpm run build-intl.Validation
npm run lint(tsc + eslint): passes (one pre-existing unrelated warning inPatientList.tsx).npm test: 150 tests pass, including new unit tests for the preset helpers (timezone handling, day/month rollover, sentinel invariants).npm run check-translations: all keys exist in every locale.07/05/2026 - 15:27in dateTime mode07/06/2026in date mode🤖 Generated with Claude Code
https://claude.ai/code/session_011FUW7ckxf9AFki2eubR3sX
Generated by Claude Code