mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 03:38:17 +00:00
vehicle
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { Loader2 } from "lucide-react";
|
import { Loader2, Calendar } from "lucide-react";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Group,
|
Group,
|
||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
Textarea,
|
Textarea,
|
||||||
TextInput,
|
TextInput,
|
||||||
|
ActionIcon,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { DatePicker } from "@mantine/dates";
|
import { DatePicker } from "@mantine/dates";
|
||||||
|
|
||||||
@@ -188,7 +189,7 @@ const FleetFormDialog = ({
|
|||||||
<DatePicker
|
<DatePicker
|
||||||
key={field.name}
|
key={field.name}
|
||||||
label={field.label}
|
label={field.label}
|
||||||
placeholder={field.placeholder || "Click to select a date"}
|
placeholder={field.placeholder || "YYYY-MM-DD"}
|
||||||
value={dateValue}
|
value={dateValue}
|
||||||
onChange={(date: Date | null) => {
|
onChange={(date: Date | null) => {
|
||||||
if (!date || !(date instanceof Date)) {
|
if (!date || !(date instanceof Date)) {
|
||||||
@@ -204,6 +205,24 @@ const FleetFormDialog = ({
|
|||||||
maxDate={new Date()}
|
maxDate={new Date()}
|
||||||
firstDayOfWeek={0}
|
firstDayOfWeek={0}
|
||||||
description={field.description || "Select a date"}
|
description={field.description || "Select a date"}
|
||||||
|
rightSection={
|
||||||
|
<ActionIcon size="sm" variant="subtle" color="gray">
|
||||||
|
<Calendar size={16} />
|
||||||
|
</ActionIcon>
|
||||||
|
}
|
||||||
|
size="sm"
|
||||||
|
radius="md"
|
||||||
|
styles={{
|
||||||
|
input: {
|
||||||
|
borderColor: "var(--mantine-color-gray-3)",
|
||||||
|
backgroundColor: "var(--mantine-color-gray-0)",
|
||||||
|
transition: "all 200ms ease",
|
||||||
|
"&:focus": {
|
||||||
|
borderColor: "var(--mantine-color-green-5)",
|
||||||
|
backgroundColor: "var(--mantine-color-gray-1)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user