mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 11:11:14 -05:00
Fix null/undefined type mismatches
This commit is contained in:
@@ -170,7 +170,11 @@ export function ManufacturerForm({ onSubmit, onCancel, initialData }: Manufactur
|
||||
})()}
|
||||
precision={(watch('founded_date_precision') as DatePrecision) || 'year'}
|
||||
onChange={(date, precision) => {
|
||||
setValue('founded_date', date ? toDateOnly(date) : undefined);
|
||||
if (date && typeof date === 'string') {
|
||||
setValue('founded_date', toDateOnly(date) as any);
|
||||
} else {
|
||||
setValue('founded_date', null as any);
|
||||
}
|
||||
setValue('founded_date_precision', precision);
|
||||
}}
|
||||
label="Founded Date"
|
||||
|
||||
Reference in New Issue
Block a user