diff --git a/components/survey/SurveyForm.tsx b/components/survey/SurveyForm.tsx index 389ebda..6d9e040 100644 --- a/components/survey/SurveyForm.tsx +++ b/components/survey/SurveyForm.tsx @@ -213,13 +213,16 @@ const SurveyForm: React.FC = ({ existingItem }) => { - handleDateChange('publicFrom', newDate)} value={dayjs(item?.publicFrom)} /> + handleDateChange('publicFrom', newDate)} + value={item && item.publicFrom ? dayjs(item.publicFrom) : null} />
- handleDateChange('publicUntil', newDate)} value={dayjs(item?.publicUntil)} /> + handleDateChange('publicUntil', newDate)} + value={item && item.publicUntil ? dayjs(item.publicUntil) : null} + />