Skip to content

Conversation

Copy link

Copilot AI commented Jul 16, 2025

This PR adds the ability to set and manage due dates for tasks in TaskHub, addressing the feature request "Kann ich bei Tasks auch ein DueDate hinterlegen?" (Can I also store a DueDate for tasks?).

Features Added

Task Creation with Due Dates: Users can now add optional due dates when creating new tasks
Due Date Display: Tasks show due dates in a readable format (e.g., "Due: 12/25/2024")
Due Date Editing: Double-click on due dates to edit them inline
Add Due Date to Existing Tasks: Button to add due dates to tasks that don't have them
Overdue Detection: Visual styling for overdue tasks (red background)
Form Integration: Date input field integrated into the add task form
Data Persistence: Due dates are stored with the task data

Screenshot

DueDate Feature Screenshot

The screenshot shows:

  • New date input field in the task creation form
  • Due dates displayed on tasks (e.g., "Due: 12/25/2024")
  • Visual distinction for overdue tasks
  • "+ Add Due Date" button for tasks without due dates

Technical Implementation

Changes Made:

  • TodoTypes.ts: Added dueDate?: Date to Todo interface and extended TodoContextType
  • TodoContext.tsx: Added updateTodoDueDate function and modified addTodo to accept due dates
  • AddTodoForm: Added date input field for setting due dates during task creation
  • TodoItem: Enhanced with due date display, editing, and overdue detection
  • TodoList: Updated to pass due date update function to TodoItem components
  • Styling: Added comprehensive CSS for due date elements with hover effects and overdue styling

Key Features:

  • Optional Due Dates: Due dates are completely optional - tasks work with or without them
  • Inline Editing: Double-click any due date to edit it directly
  • Overdue Detection: Automatically detects and highlights overdue tasks
  • Consistent UX: Follows the existing double-click-to-edit pattern used for task text and time
  • Data Persistence: Due dates are saved and loaded with the task file

Testing

The implementation has been thoroughly tested:

  • ✅ Creating tasks with due dates
  • ✅ Creating tasks without due dates
  • ✅ Adding due dates to existing tasks
  • ✅ Editing existing due dates
  • ✅ Overdue date detection and styling
  • ✅ Form clearing after task creation
  • ✅ Build and compile successfully

All existing functionality remains intact - this is a purely additive feature that doesn't break any existing workflows.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: tjarkpr <56918325+tjarkpr@users.noreply.github.com>
Copilot AI changed the title [WIP] Kann ich bei Tasks auch ein DueDate hinterlegen? Add DueDate functionality to TaskHub tasks Jul 16, 2025
Copilot AI requested a review from tjarkpr July 16, 2025 16:01
@tjarkpr tjarkpr closed this Oct 6, 2025
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.

2 participants