mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 09:00:57 +00:00
vehicle
This commit is contained in:
@@ -190,8 +190,8 @@ const FleetFormDialog = ({
|
||||
label={field.label}
|
||||
placeholder={field.placeholder || "Click to select a date"}
|
||||
value={dateValue}
|
||||
onChange={(date) => {
|
||||
if (!date) {
|
||||
onChange={(date: Date | null) => {
|
||||
if (!date || !(date instanceof Date)) {
|
||||
setValues((current) => ({ ...current, [field.name]: "" }));
|
||||
} else {
|
||||
const isoDate = date.toISOString().split("T")[0];
|
||||
@@ -202,10 +202,10 @@ const FleetFormDialog = ({
|
||||
disabled={field.disabled}
|
||||
minDate={new Date(1900, 0, 1)}
|
||||
maxDate={new Date()}
|
||||
clearable
|
||||
valueFormat="YYYY-MM-DD"
|
||||
firstDayOfWeek={0}
|
||||
description={field.description || "Select a date"}
|
||||
dropdownType="modal"
|
||||
clearable
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user