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 *"
|
||||
value={formData.date ? dayjs(formData.date) : null}
|
||||
onChange={(newValue) =>
|
||||
handleInputChange('date', newValue?.toISOString().split('T')[0] || '')
|
||||
handleInputChange('date', newValue?.format('YYYY-MM-DD') || '')
|
||||
}
|
||||
format="MM/DD/YYYY"
|
||||
slotProps={{
|
||||
|
||||
@@ -113,7 +113,7 @@ export const MaintenanceRecordForm: React.FC<MaintenanceRecordFormProps> = ({ ve
|
||||
vehicle_id: vehicleId || '',
|
||||
category: '' as any,
|
||||
subtypes: [],
|
||||
date: new Date().toISOString().split('T')[0],
|
||||
date: dayjs().format('YYYY-MM-DD'),
|
||||
odometer_reading: '' as any,
|
||||
cost: '' as any,
|
||||
shop_name: '',
|
||||
@@ -221,7 +221,7 @@ export const MaintenanceRecordForm: React.FC<MaintenanceRecordFormProps> = ({ ve
|
||||
vehicle_id: '',
|
||||
category: '' as any,
|
||||
subtypes: [],
|
||||
date: new Date().toISOString().split('T')[0],
|
||||
date: dayjs().format('YYYY-MM-DD'),
|
||||
odometer_reading: '' as any,
|
||||
cost: '' as any,
|
||||
shop_name: '',
|
||||
@@ -387,7 +387,7 @@ export const MaintenanceRecordForm: React.FC<MaintenanceRecordFormProps> = ({ ve
|
||||
label="Date *"
|
||||
value={field.value ? dayjs(field.value) : null}
|
||||
onChange={(newValue) =>
|
||||
field.onChange(newValue?.toISOString().split('T')[0] || '')
|
||||
field.onChange(newValue?.format('YYYY-MM-DD') || '')
|
||||
}
|
||||
format="MM/DD/YYYY"
|
||||
slotProps={{
|
||||
|
||||
@@ -337,7 +337,7 @@ export const MaintenanceScheduleEditDialog: React.FC<MaintenanceScheduleEditDial
|
||||
label="Due Date"
|
||||
value={formData.fixedDueDate ? dayjs(formData.fixedDueDate) : null}
|
||||
onChange={(newValue) =>
|
||||
handleInputChange('fixedDueDate', newValue?.toISOString().split('T')[0] || undefined)
|
||||
handleInputChange('fixedDueDate', newValue?.format('YYYY-MM-DD') || undefined)
|
||||
}
|
||||
format="MM/DD/YYYY"
|
||||
slotProps={{
|
||||
|
||||
@@ -412,7 +412,7 @@ export const MaintenanceScheduleForm: React.FC<MaintenanceScheduleFormProps> = (
|
||||
label="Fixed Due Date *"
|
||||
value={field.value ? dayjs(field.value) : null}
|
||||
onChange={(newValue) =>
|
||||
field.onChange(newValue?.toISOString().split('T')[0] || '')
|
||||
field.onChange(newValue?.format('YYYY-MM-DD') || '')
|
||||
}
|
||||
format="MM/DD/YYYY"
|
||||
slotProps={{
|
||||
|
||||
Reference in New Issue
Block a user