fix vehicle

This commit is contained in:
natib21
2026-06-19 06:56:07 +00:00
parent f1c2943854
commit b4ed7d492d
13 changed files with 281 additions and 14 deletions

View File

@@ -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"
/>
);
}