mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-05 02:33:38 +00:00
fix vehicle
This commit is contained in:
@@ -12,7 +12,6 @@ import {
|
||||
Textarea,
|
||||
TextInput,
|
||||
} from "@mantine/core";
|
||||
import { DateInput } from "@mantine/dates";
|
||||
|
||||
import { FLEET_SELECT_NONE, type FleetFormFieldDef } from "@/pages/fleet/config/resources";
|
||||
import type { FleetRecord } from "@/services/fleet/fleet.service";
|
||||
@@ -165,21 +164,20 @@ const FleetFormDialog = ({
|
||||
|
||||
if (field.type === "date") {
|
||||
return (
|
||||
<DateInput
|
||||
<TextInput
|
||||
key={field.name}
|
||||
type="date"
|
||||
label={field.label}
|
||||
placeholder={field.placeholder}
|
||||
value={value ? new Date(value as string) : null}
|
||||
onChange={(date) =>
|
||||
value={typeof value === "string" ? value.slice(0, 10) : ""}
|
||||
onChange={(e) =>
|
||||
setValues((current) => ({
|
||||
...current,
|
||||
[field.name]: date ? (date instanceof Date ? date.toISOString().split('T')[0] : date) : "",
|
||||
[field.name]: e.currentTarget?.value ?? "",
|
||||
}))
|
||||
}
|
||||
error={error}
|
||||
disabled={field.disabled}
|
||||
clearable
|
||||
valueFormat="DD/MM/YYYY"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user