mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-21 05:58:23 +02:00
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:
2 files changed
+3
-9
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 289 KiB |
@@ -18,7 +18,7 @@ import { z } from "zod";
|
|||||||
import { CalendarIcon, Clock, AlertTriangle, Info } from "lucide-react";
|
import { CalendarIcon, Clock, AlertTriangle, Info } from "lucide-react";
|
||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import { fr } from "date-fns/locale";
|
import { fr } from "date-fns/locale";
|
||||||
import { cn } from "@/lib/utils";
|
|
||||||
|
|
||||||
type TaskWithRelations = Task & {
|
type TaskWithRelations = Task & {
|
||||||
assignedUser?: { id: string; username: string; firstName?: string; lastName?: string; };
|
assignedUser?: { id: string; username: string; firstName?: string; lastName?: string; };
|
||||||
@@ -361,10 +361,7 @@ export default function NewTaskForm({ task, onClose }: NewTaskFormProps) {
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<Button
|
<Button
|
||||||
variant={"outline"}
|
variant={"outline"}
|
||||||
className={cn(
|
className={field.value ? "w-full pl-3 text-left font-normal" : "w-full pl-3 text-left font-normal text-muted-foreground"}
|
||||||
"w-full pl-3 text-left font-normal",
|
|
||||||
!field.value && "text-muted-foreground"
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
{field.value ? (
|
{field.value ? (
|
||||||
format(field.value, "PPP", { locale: fr })
|
format(field.value, "PPP", { locale: fr })
|
||||||
@@ -407,10 +404,7 @@ export default function NewTaskForm({ task, onClose }: NewTaskFormProps) {
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<Button
|
<Button
|
||||||
variant={"outline"}
|
variant={"outline"}
|
||||||
className={cn(
|
className={field.value ? "w-full pl-3 text-left font-normal" : "w-full pl-3 text-left font-normal text-muted-foreground"}
|
||||||
"w-full pl-3 text-left font-normal",
|
|
||||||
!field.value && "text-muted-foreground"
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
{field.value ? (
|
{field.value ? (
|
||||||
format(field.value, "PPP", { locale: fr })
|
format(field.value, "PPP", { locale: fr })
|
||||||
|
|||||||
Reference in new issue
Block a user