Adjust task date handling to correctly manage start and end dates

Modify the task creation logic in `TasksSimplified.tsx` to properly initialize `startDate` to null and ensure `dueDate` is set to null when not provided, resolving an issue with date range selection.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: f2b9c241-9fdd-4abd-9041-720afc8b27d6
Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
michaelschal committed 2025-09-02 09:52:25 +00:00
1 parent a4a6f302ae
commit a9564c513a
2 files changed
+239 -1

No files matched your search

+2 -1
View File
@@ -418,7 +418,8 @@ function TaskForm({ onSubmit, initialData, isEditing = false }: {
description: description.trim() || undefined,
assignedTo: assignedTo?.trim() || "Non assigné",
priority,
dueDate: dueDate ? new Date(dueDate).toISOString() : undefined,
startDate: null, // Toujours inclure startDate même si null
dueDate: dueDate ? new Date(dueDate).toISOString() : null,
};
onSubmit(taskData);