Merge pull request #256 from R0m1k3/1.1

Adjust date picker to display placeholder text when no date is selected
This commit is contained in:
LogiFlow authored and GitHub committed 2025-08-19 11:42:02 +02:00
commit 8fbf5ccd9e
2 files changed
+3 -9

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

+3 -9
View File
@@ -18,7 +18,7 @@ import { z } from "zod";
import { CalendarIcon, Clock, AlertTriangle, Info } from "lucide-react";
import { format } from "date-fns";
import { fr } from "date-fns/locale";
import { cn } from "@/lib/utils";
type TaskWithRelations = Task & {
assignedUser?: { id: string; username: string; firstName?: string; lastName?: string; };
@@ -361,10 +361,7 @@ export default function NewTaskForm({ task, onClose }: NewTaskFormProps) {
<FormControl>
<Button
variant={"outline"}
className={cn(
"w-full pl-3 text-left font-normal",
!field.value && "text-muted-foreground"
)}
className={field.value ? "w-full pl-3 text-left font-normal" : "w-full pl-3 text-left font-normal text-muted-foreground"}
>
{field.value ? (
format(field.value, "PPP", { locale: fr })
@@ -407,10 +404,7 @@ export default function NewTaskForm({ task, onClose }: NewTaskFormProps) {
<FormControl>
<Button
variant={"outline"}
className={cn(
"w-full pl-3 text-left font-normal",
!field.value && "text-muted-foreground"
)}
className={field.value ? "w-full pl-3 text-left font-normal" : "w-full pl-3 text-left font-normal text-muted-foreground"}
>
{field.value ? (
format(field.value, "PPP", { locale: fr })