Fix type errors in admin components

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 01:24:54 +00:00
parent 8281fb9852
commit 2ce837f376
7 changed files with 45 additions and 41 deletions

View File

@@ -163,7 +163,11 @@ export function ManufacturerForm({ onSubmit, onCancel, initialData }: Manufactur
{/* Additional Details */}
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<FlexibleDateInput
value={watch('founded_date') ? parseDateOnly(watch('founded_date')) : undefined}
value={(() => {
const dateValue = watch('founded_date');
if (!dateValue) return undefined;
return parseDateOnly(dateValue);
})()}
precision={(watch('founded_date_precision') as DatePrecision) || 'year'}
onChange={(date, precision) => {
setValue('founded_date', date ? toDateOnly(date) : undefined);