fix(web): render date-only due dates without a time component#248
Merged
Conversation
When a task is given a due date without a time, the value is stored at the end of the day (23:59:59.999) as a date-only sentinel. The task views, however, always rendered the due date with that time and the inline table editor forced a date+time mode, so a meaningless time appeared whenever only a date was selected (issue #215). Add `DueDateUtils.isDateOnly` to detect the sentinel and: - hide the time in the task list and task card due-date displays for date-only due dates - let the inline due-date editor toggle between date-only and date+time via FlexibleDateTimeInput, defaulting to the current value's granularity https://claude.ai/code/session_018XwCELPc4u4QsnxXqAhNa4
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.
Summary
Fixes #215.
When a task is given a due date without a time, the date input stores the value at the end of the day (
23:59:59.999) — a "date-only" sentinel. However, the task views always rendered that due date with the time, and the inline table editor forced a date+time mode. The result was a meaningless time appearing whenever only a date was selected.Changes
web/utils/dueDate.ts— addDueDateUtils.isDateOnly(...)which detects the end-of-day sentinel (23:59:59.999) used by hightide'sFlexibleDateTimeInput.web/components/tables/TaskList.tsx— hide the time in the due-date cell for date-only due dates, and let the inline editor open in the matching granularity.web/components/tasks/TaskCardView.tsx— hide the time on the task card for date-only due dates.web/components/tables/in-table-edit/InTableDateTimeEditPopUp.tsx— add aflexibleprop that rendersFlexibleDateTimeInput, so the inline due-date editor can toggle between date-only and date+time instead of always requiring a time.web/utils/dueDate.test.ts— unit tests forisDateOnly.Verification
npx vitest run utils/dueDate.test.ts— 4 passingnpx tsc --noEmit— cleannpx eslinton changed files — cleanhttps://claude.ai/code/session_018XwCELPc4u4QsnxXqAhNa4
Generated by Claude Code