diff --git a/components/TempDesignSystem/Form/Date/index.tsx b/components/TempDesignSystem/Form/Date/index.tsx index 25caf72f3..7b9dbc083 100644 --- a/components/TempDesignSystem/Form/Date/index.tsx +++ b/components/TempDesignSystem/Form/Date/index.tsx @@ -60,7 +60,7 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) { * date, but we can't check isNan since * we recieve the date as "1999-01-01" */ - dateValue = parseDate(d) + dateValue = d ? parseDate(d) : null } catch (error) { console.error(error) } @@ -100,7 +100,7 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) { placeholder="DD" required tabIndex={3} - value={segment.value} + value={segment.isPlaceholder ? undefined : segment.value} /> ) @@ -116,7 +116,7 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) { placeholder="MM" required tabIndex={2} - value={segment.value} + value={segment.isPlaceholder ? undefined : segment.value} /> ) @@ -132,7 +132,7 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) { placeholder="YYYY" required tabIndex={1} - value={segment.value} + value={segment.isPlaceholder ? undefined : segment.value} /> )