fix: Date picker bug
All checks were successful
Deploy to Staging / Build Images (push) Successful in 1m18s
Deploy to Staging / Deploy to Staging (push) Successful in 16s
Deploy to Staging / Verify Staging (push) Successful in 4s
Deploy to Staging / Notify Staging Ready (push) Successful in 4s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
All checks were successful
Deploy to Staging / Build Images (push) Successful in 1m18s
Deploy to Staging / Deploy to Staging (push) Successful in 16s
Deploy to Staging / Verify Staging (push) Successful in 4s
Deploy to Staging / Notify Staging Ready (push) Successful in 4s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
This commit is contained in:
@@ -337,7 +337,7 @@ export const MaintenanceRecordEditDialog: React.FC<MaintenanceRecordEditDialogPr
|
|||||||
label="Service Date *"
|
label="Service Date *"
|
||||||
value={formData.date ? dayjs(formData.date) : null}
|
value={formData.date ? dayjs(formData.date) : null}
|
||||||
onChange={(newValue) =>
|
onChange={(newValue) =>
|
||||||
handleInputChange('date', newValue?.toISOString().split('T')[0] || '')
|
handleInputChange('date', newValue?.format('YYYY-MM-DD') || '')
|
||||||
}
|
}
|
||||||
format="MM/DD/YYYY"
|
format="MM/DD/YYYY"
|
||||||
slotProps={{
|
slotProps={{
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export const MaintenanceRecordForm: React.FC<MaintenanceRecordFormProps> = ({ ve
|
|||||||
vehicle_id: vehicleId || '',
|
vehicle_id: vehicleId || '',
|
||||||
category: '' as any,
|
category: '' as any,
|
||||||
subtypes: [],
|
subtypes: [],
|
||||||
date: new Date().toISOString().split('T')[0],
|
date: dayjs().format('YYYY-MM-DD'),
|
||||||
odometer_reading: '' as any,
|
odometer_reading: '' as any,
|
||||||
cost: '' as any,
|
cost: '' as any,
|
||||||
shop_name: '',
|
shop_name: '',
|
||||||
@@ -221,7 +221,7 @@ export const MaintenanceRecordForm: React.FC<MaintenanceRecordFormProps> = ({ ve
|
|||||||
vehicle_id: '',
|
vehicle_id: '',
|
||||||
category: '' as any,
|
category: '' as any,
|
||||||
subtypes: [],
|
subtypes: [],
|
||||||
date: new Date().toISOString().split('T')[0],
|
date: dayjs().format('YYYY-MM-DD'),
|
||||||
odometer_reading: '' as any,
|
odometer_reading: '' as any,
|
||||||
cost: '' as any,
|
cost: '' as any,
|
||||||
shop_name: '',
|
shop_name: '',
|
||||||
@@ -387,7 +387,7 @@ export const MaintenanceRecordForm: React.FC<MaintenanceRecordFormProps> = ({ ve
|
|||||||
label="Date *"
|
label="Date *"
|
||||||
value={field.value ? dayjs(field.value) : null}
|
value={field.value ? dayjs(field.value) : null}
|
||||||
onChange={(newValue) =>
|
onChange={(newValue) =>
|
||||||
field.onChange(newValue?.toISOString().split('T')[0] || '')
|
field.onChange(newValue?.format('YYYY-MM-DD') || '')
|
||||||
}
|
}
|
||||||
format="MM/DD/YYYY"
|
format="MM/DD/YYYY"
|
||||||
slotProps={{
|
slotProps={{
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ export const MaintenanceScheduleEditDialog: React.FC<MaintenanceScheduleEditDial
|
|||||||
label="Due Date"
|
label="Due Date"
|
||||||
value={formData.fixedDueDate ? dayjs(formData.fixedDueDate) : null}
|
value={formData.fixedDueDate ? dayjs(formData.fixedDueDate) : null}
|
||||||
onChange={(newValue) =>
|
onChange={(newValue) =>
|
||||||
handleInputChange('fixedDueDate', newValue?.toISOString().split('T')[0] || undefined)
|
handleInputChange('fixedDueDate', newValue?.format('YYYY-MM-DD') || undefined)
|
||||||
}
|
}
|
||||||
format="MM/DD/YYYY"
|
format="MM/DD/YYYY"
|
||||||
slotProps={{
|
slotProps={{
|
||||||
|
|||||||
@@ -412,7 +412,7 @@ export const MaintenanceScheduleForm: React.FC<MaintenanceScheduleFormProps> = (
|
|||||||
label="Fixed Due Date *"
|
label="Fixed Due Date *"
|
||||||
value={field.value ? dayjs(field.value) : null}
|
value={field.value ? dayjs(field.value) : null}
|
||||||
onChange={(newValue) =>
|
onChange={(newValue) =>
|
||||||
field.onChange(newValue?.toISOString().split('T')[0] || '')
|
field.onChange(newValue?.format('YYYY-MM-DD') || '')
|
||||||
}
|
}
|
||||||
format="MM/DD/YYYY"
|
format="MM/DD/YYYY"
|
||||||
slotProps={{
|
slotProps={{
|
||||||
|
|||||||
Reference in New Issue
Block a user