Fix remaining console logs and types

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 20:04:11 +00:00
parent 6fbaf0c606
commit 2cd6b2c6c3
10 changed files with 127 additions and 42 deletions

View File

@@ -174,9 +174,9 @@ export function ManufacturerForm({ onSubmit, onCancel, initialData }: Manufactur
precision={(watch('founded_date_precision') as DatePrecision) || 'year'}
onChange={(date, precision) => {
if (date && typeof date === 'string') {
setValue('founded_date', toDateOnly(date) as any);
setValue('founded_date', toDateOnly(date), { shouldValidate: true });
} else {
setValue('founded_date', null as any);
setValue('founded_date', '', { shouldValidate: true });
}
setValue('founded_date_precision', precision);
}}